membership createuserwizard add extended property.

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 &nbsp; 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>
 
P

PeterKellner

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

Scott Guthrie has a very nice example of how to do this at this URL

http://weblogs.asp.net/scottgu/archive/2005/10/18/427754.aspx

Peter Kellner
http://peterkellner.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top