G
guoqi zheng
Dear sir,
I am using the createUserWizard of ASP.NET 2.0. I am trying to add two extra
fields to it. FirstName and LastName. However I did not find out how can get
the value out of this two addtional fields?
I tried
Dim ctlFirstName As TextBox = CType(CreateUserWizard1.
FindControl("txtFirstName"), TextBox)
Obviously it did not work out. What should I do? The html code for
createUserWizard can be found at the end of this post.
regards,
Guoqi Zheng
http://www.ureader.com
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server">
<WizardSteps>
<asp:CreateUserWizardStep runat="server">
<ContentTemplate>
<table border="0">
<tr>
<td align="center" colspan="2">
Create New Account</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="UserNameLabel"
runat="server" AssociatedControlID="UserName">User Name:</asp:Label></td>
<td>
<asp:TextBox ID="UserName"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator
ID="UserNameRequired" runat="server" ControlToValidate="UserName"
ErrorMessage="User Name is required.
" ToolTip="User Name is required."
ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
.......................
<tr>
<td align="right">
<asp:Label ID="LbLastName"
runat="server">last name:</asp:Label></td>
<td>
<asp:TextBox ID="txtLastName"
runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:CompareValidator
ID="PasswordCompare" runat="server" ControlToCompare="Password"
ControlToValidate="ConfirmPassword"
Display="Dynamic" ErrorMessage="The Password and Confirmation Password must
match."
ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color:
red">
<asp:Literal ID="ErrorMessage"
runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
</table>
</ContentTemplate>
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep runat="server">
</asp:CompleteWizardStep>
</WizardSteps>
</asp:CreateUserWizard>
I am using the createUserWizard of ASP.NET 2.0. I am trying to add two extra
fields to it. FirstName and LastName. However I did not find out how can get
the value out of this two addtional fields?
I tried
Dim ctlFirstName As TextBox = CType(CreateUserWizard1.
FindControl("txtFirstName"), TextBox)
Obviously it did not work out. What should I do? The html code for
createUserWizard can be found at the end of this post.
regards,
Guoqi Zheng
http://www.ureader.com
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server">
<WizardSteps>
<asp:CreateUserWizardStep runat="server">
<ContentTemplate>
<table border="0">
<tr>
<td align="center" colspan="2">
Create New Account</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="UserNameLabel"
runat="server" AssociatedControlID="UserName">User Name:</asp:Label></td>
<td>
<asp:TextBox ID="UserName"
runat="server"></asp:TextBox>
<asp:RequiredFieldValidator
ID="UserNameRequired" runat="server" ControlToValidate="UserName"
ErrorMessage="User Name is required.
" ToolTip="User Name is required."
ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
</td>
</tr>
.......................
<tr>
<td align="right">
<asp:Label ID="LbLastName"
runat="server">last name:</asp:Label></td>
<td>
<asp:TextBox ID="txtLastName"
runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:CompareValidator
ID="PasswordCompare" runat="server" ControlToCompare="Password"
ControlToValidate="ConfirmPassword"
Display="Dynamic" ErrorMessage="The Password and Confirmation Password must
match."
ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
</td>
</tr>
<tr>
<td align="center" colspan="2" style="color:
red">
<asp:Literal ID="ErrorMessage"
runat="server" EnableViewState="False"></asp:Literal>
</td>
</tr>
</table>
</ContentTemplate>
</asp:CreateUserWizardStep>
<asp:CompleteWizardStep runat="server">
</asp:CompleteWizardStep>
</WizardSteps>
</asp:CreateUserWizard>