Click here to Skip to main content
12,621,492 members (35,655 online)
Rate this:
 
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 15:53pm
Updated 23-Dec-12 15:55pm
v2
Comments
Krunal Rohit 24-Dec-12 0:46am
   
Provide your code..
symonsarwar 24-Dec-12 2:36am
   
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server"
oncreateduser="CreateUserWizard1_CreatedUser1">
<wizardsteps>
<asp:CreateUserWizardStep runat="server">
<contenttemplate>
<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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.161128.1 | Last Updated 23 Dec 2012
Copyright © CodeProject, 1999-2016
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