Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4334588
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:33:00+00:00 2026-05-21T10:33:00+00:00

<asp:LoginView ID=LoginView4 runat=server> <AnonymousTemplate> <asp:DropShadowExtender ID=DropShadowExtender3 runat=server TargetControlID=Panel3 Opacity=.38 Rounded=true> </asp:DropShadowExtender> <asp:Panel ID=Panel3 runat=server

  • 0
<asp:LoginView ID="LoginView4" runat="server">
      <AnonymousTemplate>

      <asp:DropShadowExtender ID="DropShadowExtender3" runat="server" 
                                TargetControlID="Panel3" 
                                Opacity=".38" 
                                Rounded="true">
              </asp:DropShadowExtender>
              <asp:Panel ID="Panel3" runat="server" 
                                     BackColor="Silver" Width="400px">

              <asp:CreateUserWizard ID="CreateUserWizard1" 
                                    runat="server" 
                                    ContinueDestinationPageUrl="~/ViewCart_aspx/ViewCart.aspx" 
                      oncreateduser="CreateUserWizard1_CreatedUser">


              <WizardSteps>
                  <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server" >
                      <ContentTemplate>
                         <fieldset class="push">
                          <table border="0">
                              <tr>
                                  <td align="center" colspan="2">
                                      <h3 style="text-align:center;">Sign Up for Your New Account</h3></td>
                              </tr>
                              <tr>
                                  <td align="right">
                                      <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
                                  </td>
                                  <td>&nbsp;
                                      **<asp:TextBox ID="UserName" runat="server" Width="150px"></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>

I am using this code to find the control

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

but it gives me an error

“Error 12 Name ‘CreateUserWizardStep1’ is not declared.”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T10:33:00+00:00Added an answer on May 21, 2026 at 10:33 am

    You’ll have to use FindControl() on LoginView to reference CreateUserWizardStep1 first.

    Dim CreateUserWizardStep1 As CreateUserWizard = 
        DirectCast(LoginView4.FindControl("CreateUserWizard1"), CreateUserWizard)
    

    and then you can do

    If CreateUserWizardStep1 IsNot Nothing 
    
         Dim UserNameTextBox As TextBox = DirectCast(CreateUserWizardStep1.ContentTemplateContainer.FindControl("UserName"), TextBox)
            Roles.AddUserToRole(UserNameTextBox.Text, "User")
    End If
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<asp:LoginView ID=LoginView1 runat=server> <RoleGroups> <asp:RoleGroup Roles=Administrators, Moderators> <asp:Table ID=Table2 runat=server Width=156px BorderStyle=Dashed> <asp:TableRow runat=server
Let's say I have a rolegroup as follows: <asp:LoginView ID=lvDoSomeStuff runat=server> <RoleGroups> <asp:RoleGroup Roles=RoleOne,RoleTwo>
I have a fairly simple form: <asp:FormView> <EditItemTemplate> <asp:LoginView> <RoleGroups> <asp:RoleGroup roles=Blah> <ContentTemplate> <!--
I want to expire my login cookie whenever the LoginView in my asp.net application
I have a LoginView in my APS.NET application with AnonymousTemplate and LoggedInTemplate. I've put
I have a masterpage with a loginview, in the loginview i have an asp
ASP.NET MVC can generate HTML elements using HTML Helpers, for example @Html.ActionLink() , @Html.BeginForm()
ASP.Net 3.5 I want to create a user control that contains the ListView and
Asp.Net 3.5 / WebForms (no ajax) I am trying to update a delete confirm
ASP.Net MVC Controllers have several methods of forwarding control to another controller or action.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.