title: Why Can't I Reference a TextBox by ID When it's in a CreateUserWizard Control?
body: <p>I got a wierd problem here.</p>
  
  <p>Inside an asp.net CreateUserWizard, I got some elements, but I can't seem to access them from my code-behind.</p>
  
  <p>Here's a code snippet:</p>
  
  <p><strong>Markup:</strong></p>
  
  <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CreateUserWizard.ascx.cs" Inherits="Web.UserControls.CreateUserWizard" %&gt;
  &lt;asp:CreateUserWizard ID="CreateUserWizard1" runat="server" OnCreatingUser="CreatingUser"&gt;
  &lt;WizardSteps&gt;
      &lt;asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server"&gt;
          &lt;ContentTemplate&gt;
              &lt;table border="0"&gt;
                 &lt;tr&gt;
                      &lt;td&gt;
                          &lt;span class="requiredField"/&gt;
                          &lt;asp:Label ID="NameLabel" runat="server" AssociatedControlID="NameRequiredFieldValidator"&gt;Navn:&lt;/asp:Label&gt;                      
                          &lt;asp:CheckBox ID="ShareInfoCheckBox" runat="server" Checked="True" Text="Share my information with partner sites." /&gt;
                      &lt;/td&gt;
                      &lt;td&gt;
                          &lt;asp:TextBox ID="Name" runat="server"&gt;&lt;/asp:TextBox&gt;
                          &lt;asp:RequiredFieldValidator ID="NameRequiredFieldValidator" runat="server" 
                              ControlToValidate="Name" ErrorMessage="Du skal indtaste dit navn" 
                              ToolTip="Du skal indtaste dit navn" ValidationGroup="CreateUserWizard1"&gt;*&lt;/asp:RequiredFieldValidator&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
               &lt;/ContentTemplate&gt;
      &lt;/asp:CreateUserWizardStep&gt;
  &lt;/WizardSteps&gt;
  &lt;/asp:CreateUserWizard&gt;
  </code></pre>
  
  <p>.. And here's the codebehind:</p>
  
  <pre><code>public partial class CreateUserWizard : System.Web.UI.UserControl
  {
      protected void Page_Load(object sender, EventArgs e)
      {
  
      }
  
      protected void CreatingUser(object sender, EventArgs e)
      {
          Name. //no intellisense and compiler error when I try to access Name
      }
  }
  </code></pre>
  
  <p>Shouldn't this work? It's inside a UserControl if that makes any difference.</p>
  
  <p>Thanks in advance</p>