Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to find the control?
    primarykey
    data
    text
    <pre><code>&lt;asp:LoginView ID="LoginView4" runat="server"&gt; &lt;AnonymousTemplate&gt; &lt;asp:DropShadowExtender ID="DropShadowExtender3" runat="server" TargetControlID="Panel3" Opacity=".38" Rounded="true"&gt; &lt;/asp:DropShadowExtender&gt; &lt;asp:Panel ID="Panel3" runat="server" BackColor="Silver" Width="400px"&gt; &lt;asp:CreateUserWizard ID="CreateUserWizard1" runat="server" ContinueDestinationPageUrl="~/ViewCart_aspx/ViewCart.aspx" oncreateduser="CreateUserWizard1_CreatedUser"&gt; &lt;WizardSteps&gt; &lt;asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server" &gt; &lt;ContentTemplate&gt; &lt;fieldset class="push"&gt; &lt;table border="0"&gt; &lt;tr&gt; &lt;td align="center" colspan="2"&gt; &lt;h3 style="text-align:center;"&gt;Sign Up for Your New Account&lt;/h3&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="right"&gt; &lt;asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName"&gt;User Name:&lt;/asp:Label&gt; &lt;/td&gt; &lt;td&gt;&amp;nbsp; **&lt;asp:TextBox ID="UserName" runat="server" Width="150px"&gt;&lt;/asp:TextBox&gt;** &lt;asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizard1"&gt;*&lt;/asp:RequiredFieldValidator&gt; &lt;/td&gt; </code></pre> <p>I am using this code to find the control</p> <pre><code>Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs) Dim UserNameTextBox As TextBox = DirectCast(CreateUserWizardStep1.ContentTemplateContainer.FindControl("UserName"), TextBox) Roles.AddUserToRole(UserNameTextBox.Text, "User") End Sub </code></pre> <p>but it gives me an error </p> <blockquote> <p>"Error 12 Name 'CreateUserWizardStep1' is not declared."</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload