Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
hi, for some reason i am forced to use createuser wizard which is in the asp.net membership provider.I removed all the textboxes from the wizard and brought some from the toolbox,but the problem is , in the codebehind i cannt find the controls.
error like...
textbox1.text doesn't exist in the current context.Please someone help me here.because i need to store the values in my own created database.
thanks
Posted 23-Dec-12 14:53pm
Edited 23-Dec-12 14:55pm
v2
Comments
Krunal Rohit at 24-Dec-12 0:46am
   
Provide your code..
symonsarwar at 24-Dec-12 2:36am
   
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server"
oncreateduser="CreateUserWizard1_CreatedUser1">

<asp:CreateUserWizardStep runat="server">

<table>
<tr>
<td align="center" colspan="2">
Sign Up for Your New Account</td>
</tr>
<tr>
<td align="right">
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server">
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server"
ControlToValidate="UserName" ErrorMessage="User Name is required."
ToolTip="User Name is required." ValidationGroup="CreateUserWizard1">*
</td>
</tr>
<tr>
<td align="right">
ValidationGroup="CreateUserWizard1">*


 
in the codebehind
...........Cmd.Parameters.AddWithValue("@username",textbox1.text)//error textbox.text does not exist in the current context

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 210
1 kbrandwijk 100
2 Richard MacCutchan 100
3 ProgramFOX 80
4 Mukesh Bhagat 65
0 Sergey Alexandrovich Kryukov 9,050
1 OriginalGriff 8,151
2 CPallini 2,613
3 Richard MacCutchan 2,221
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 23 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100