title: Preventing a user from clicking twice on createUserWizard
body: <p>Occasionally, I somehow get a user that gets registered twice in asp.net web app. the registration uses the createUserwizard, and users and emails are set to unique, so I have no clue and have had no luck getting an answer on that in another post, so I have moved to another way to solve this. I think it might be from the user click the 'register' button twice close together. I have been trying many solutions to either disable the button after click (that is tough b/c of validation of fields), or popup a not saying "creating user', or even just change the button text to 'creating', like this <a href="https://stackoverflow.com/questions/6137172/how-do-i-prevent-users-clicking-a-button-twice">solution --with no luck (Rory's)</a>. I do not get an error with this, but no button change happens. Here is my wizard (took out the EUA, chk box pass hint)</p>
  
  <pre><code>&lt;WizardSteps&gt;
      &lt;asp:CreateUserWizardStep runat="server" ID="RegisterUserWizardStep" &gt;
          &lt;ContentTemplate&gt;
              &lt;p class="message-info"&gt;Passwords are required to be a minimum of &lt;%: Membership.MinRequiredPasswordLength %&gt; characters in length.&lt;/p&gt;
              &lt;p class="validation-summary-errors"&gt;
                  &lt;asp:Literal runat="server" ID="ErrorMessage" /&gt;
              &lt;/p&gt;
              &lt;fieldset&gt;
                  &lt;legend&gt;Registration Form&lt;/legend&gt;
                  &lt;ol&gt;
                      &lt;li&gt;
                          &lt;asp:Label runat="server" AssociatedControlID="UserName"&gt;User name&lt;/asp:Label&gt;
                          &lt;asp:TextBox runat="server" ID="UserName" /&gt;
                          &lt;asp:RequiredFieldValidator runat="server" ControlToValidate="UserName"
                              CssClass="field-validation-error" ErrorMessage="The user name field is required." /&gt;
                          &lt;asp:RegularExpressionValidator runat="server" ControlToValidate="UserName"
                              CssClass="field-validation-error" ErrorMessage="No spaces or special characters" ValidationExpression="^[a-zA-Z0-9]+$" /&gt;
                      &lt;/li&gt;
                      &lt;li&gt;
                          &lt;asp:Label runat="server" AssociatedControlID="Email"&gt;Email address&lt;/asp:Label&gt;
                          &lt;asp:TextBox runat="server" ID="Email" TextMode="Email" /&gt;
                          &lt;asp:RequiredFieldValidator runat="server" ControlToValidate="Email"
                              CssClass="field-validation-error" ErrorMessage="The email address field is required." /&gt;
                      &lt;/li&gt;
                      &lt;li&gt;
                          &lt;asp:Label runat="server" AssociatedControlID="Password"&gt;Password&lt;/asp:Label&gt;
                          &lt;asp:TextBox runat="server" ID="Password" TextMode="Password" /&gt;
                          &lt;asp:RequiredFieldValidator runat="server" ControlToValidate="Password"
                              CssClass="field-validation-error" ErrorMessage="The password field is required." /&gt;
                      &lt;/li&gt;
                      &lt;li&gt;
                          &lt;asp:Label runat="server" AssociatedControlID="ConfirmPassword"&gt;Confirm password&lt;/asp:Label&gt;
                          &lt;asp:TextBox runat="server" ID="ConfirmPassword" TextMode="Password" /&gt;
                          &lt;asp:RequiredFieldValidator runat="server" ControlToValidate="ConfirmPassword"
                               CssClass="field-validation-error" Display="Dynamic" ErrorMessage="The confirm password field is required." /&gt;
                          &lt;asp:CompareValidator runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword"
                               CssClass="field-validation-error" Display="Dynamic" ErrorMessage="The password and confirmation password do not match." /&gt;
                      &lt;/li&gt;
                  &lt;/ol&gt;
                  &lt;asp:Button ID="registerBtn" runat="server" CommandName="MoveNext" Text="Register" " /&gt;
              &lt;/fieldset&gt;
          &lt;/ContentTemplate&gt;
          &lt;CustomNavigationTemplate /&gt;
      &lt;/asp:CreateUserWizardStep&gt;
  &lt;/WizardSteps&gt;
  </code></pre>
  
  <p>Any help preventing this x2 click would be greatly appreciated--it keeps breaking my ability to use the asp console tool when I get the "[user] key already exists" error.</p>