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

  • SEARCH
  • Home
  • 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 3219962
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:42:24+00:00 2026-05-17T15:42:24+00:00

I have a text box that is intended for an Email address. I am

  • 0

I have a text box that is intended for an Email address. I am using a Regular eExppression validation control to validate the email address.

When I place the following lines of code in a blank web Form, the validator works properly.

<asp:TextBox ID="Email" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="80"></asp:TextBox>

<asp:RegularExpressionValidator ID="valEmail" runat="server" ControlToValidate="Email" ErrorMessage="Invalid Email address" SetFocusOnError="True" ToolTip="Invalid Email address" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator`>

However, when I use the validation control within a CreateUserWizard control, it does not seem to fire but other validation controls (Required and Custom validators) do fire, but not the regular expression validator above for validating the address.

The following is my complete web page. The two controls above appear unchanged in the code below, they are simply embedded into the wizard control mentioned.

<%@ Page Title="" Language="VB" MasterPageFile="~/Master Pages/MasterPage.master" AutoEventWireup="false" CodeFile="Login.aspx.vb" Inherits="Login" %>

<%@ MasterType VirtualPath="~/Master Pages/MasterPage.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .TextboxWidth
        {
            width: 200px;
        }
        .Heading
        {
            font-weight: bold;
            font-size: 12pt;
            color: rgb(44, 68, 105);
        }
        .StdFrameWidth
        {
            width: 350px;
        }
        .StdTableWidth
        {
            width: 750px;
        }                

    </style>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="phPageContent" runat="Server">
    <div style="margin-left: 10px; margin-top: 30px;">
        <h1 style="text-align: left;">
            Affiliate Program</h1>
        <div class="LightText">
        </div>
        <hr />
        <asp:ValidationSummary ID="ValidationSummary2" runat="server" ValidationGroup="Login1" />
    </div>
    <table class="StdTableWidth">
        <tr>
            <td style="padding-top: 10px; padding-left: 20px; padding-right: 20px; vertical-align: top;">
                <div>
                    <div>
                        Some General high-level bullshit about the Affiliate program.</div>
                </div>
            </td>
            <td>
                <fieldset>
                    <legend class="StdFrameWidth StdLegend">Already an Affiliate?</legend>
                    <asp:Login ID="Login1" runat="server" CreateUserText="Register" DestinationPageUrl="~/Secure/AffiliateDefault.aspx" FailureText="Unsuccessful login. Please try again.">
                        <LayoutTemplate>
                            <table cellpadding="2" cellspacing="2" style="border-collapse: collapse; margin-top: 15px;">
                                <colgroup>
                                </colgroup>
                                <tr>
                                    <td align="right" style="white-space: nowrap;">
                                        <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="LightText">User Name:</asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="UserName" runat="server" CssClass="DefaultTextBox  TextboxWidth"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="Login1">Required</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="LightText">Password:</asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="Password" runat="server" CssClass="DefaultTextBox  TextboxWidth" TextMode="Password"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="Login1" SetFocusOnError="True">Required</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td>
                                    </td>
                                    <td>
                                    </td>
                                    <tr>
                                        <td colspan="2" style="text-align: right;">
                                            <asp:CheckBox ID="RememberMe" runat="server" CssClass="LightText" Text="Remember me next time." />
                                        </td>
                                        <td>
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="2" style="color: Red;">
                                            <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                        </td>
                                        <td align="center" style="color: Red;">
                                            &nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right" colspan="2">
                                            <asp:Button ID="LoginButton" runat="server" CommandName="Login" OnPreRender="LoginButton_PreRender" Text="Log In" ValidationGroup="Login1" />
                                        </td>
                                        <td align="right">
                                            &nbsp;
                                        </td>
                                    </tr>
                                </tr>
                            </table>
                        </LayoutTemplate>
                    </asp:Login>
                </fieldset>
            </td>
        </tr>
    </table>
    <table bgcolor="#F7F7F7" class="StdTableWidth">
        <tr>
            <td style="padding-top: 10px; padding-left: 20px; padding-right: 20px; vertical-align: top;">
                <div>
                    <div class="Heading">
                        Heading
                    </div>
                    <div>
                        Body dk dfljdsf lksdjf ldskfj dslkfj sdlfkjds flkjsdf lksdjf lsdkfj sdlfkj sdlfkjsd flkjsd flkdsjf lkdsjf lksdjf lsdkjf dslfkj sdlfkjs dlfkjdsf
                    </div>
                    <div class="Heading" style="margin-top: 20px;">
                        Heading
                    </div>
                    <div>
                        Body dk dfljdsf lksdjf ldskfj dslkfj sdlfkjds flkjsdf lksdjf lsdkfj sdlfkj sdlfkjsd flkjsd flkdsjf lkdsjf lksdjf lsdkjf dslfkj sdlfkjs dlfkjdsf
                    </div>
                </div>
            </td>
            <td style="vertical-align: top;">
                <fieldset style="background-color: #FFFFFF;">
                    <legend class="StdFrameWidth StdLegend">Affiliate Program Registration</legend>
                    <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" Style="margin-top: 10px;" CreateUserButtonText="Register" ContinueDestinationPageUrl="~/Secure/AffiliateDefault.aspx" BorderColor="Gray" BorderStyle="None" CellPadding="5">
                        <SideBarTemplate>
                            Sidebar template
                        </SideBarTemplate>
                        <CreateUserButtonStyle CssClass="RegisterButtonClass" />
                        <WizardSteps>
                            <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                                <ContentTemplate>
                                    <table border="0" cellpadding="2" cellspacing="2">
                                        <colgroup>
                                            <col width="150px" />
                                            <col width="150px" />
                                            <col />
                                        </colgroup>
                                        <tr>
                                            <td align="right">
                                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="DefaultLabelCaption">Create User Name:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="UserName" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="25"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="DefaultLabelCaption">Password:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="Password" runat="server" CssClass="DefaultTextBox TextboxWidth" TextMode="Password"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" Display="Dynamic" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword" CssClass="DefaultLabelCaption">Confirm Password:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="ConfirmPassword" runat="server" CssClass="DefaultTextBox TextboxWidth" TextMode="Password" MaxLength="25"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required." ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                                <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match." SetFocusOnError="True" ValidationGroup="CreateUserWizard1">*</asp:CompareValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Label ID="EmailLabel0" runat="server" AssociatedControlID="txtFirstName" CssClass="DefaultLabelCaption">First Name:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtFirstName" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="25"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="FirstNameRequired" runat="server" ControlToValidate="txtFirstName" Display="Dynamic" ErrorMessage="First Name is required." ToolTip="First Name is required" ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Label ID="EmailLabel1" runat="server" AssociatedControlID="txtLastName" CssClass="DefaultLabelCaption">Last Name:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtLastName" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="30"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="LastNameRequired" runat="server" ControlToValidate="txtLastName" Display="Dynamic" ErrorMessage="Last Name is required." ToolTip="Last Name is required." ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" CssClass="DefaultLabelCaption">E-mail:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="Email" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="80"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email" Display="Dynamic" ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="valEmail" runat="server" ControlToValidate="Email" ErrorMessage="Invalid Email address" SetFocusOnError="True" ToolTip="Invalid Email address" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Label ID="CompanyLabel" runat="server" AssociatedControlID="txtCompanyName" CssClass="DefaultLabelCaption">Company Name:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtCompanyName" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="80"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="CompanyNameRequired" runat="server" ControlToValidate="txtCompanyName" Display="Dynamic" ErrorMessage="Company Name is required." SetFocusOnError="True" ToolTip="Company Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Label ID="AnswerLabel0" runat="server" AssociatedControlID="Answer" CssClass="DefaultLabelCaption">Website URL:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtWebsiteUrl" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="256"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="WebsiteUrlRequired" runat="server" ControlToValidate="txtWebsiteUrl" Display="Dynamic" ErrorMessage="Website URL is required." SetFocusOnError="True" ToolTip="Company Website URL is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                                <asp:CustomValidator ID="cvalWebsiteUrl" runat="server" ControlToValidate="txtWebsiteUrl" ErrorMessage="Company Website URL has already been registered." onservervalidate="cvalWebsiteUrl_ServerValidate" SetFocusOnError="True" ToolTip="Company Website URL has already been registered." ValidationGroup="CreateUserWizard1">*</asp:CustomValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Label ID="TaxIdLabel" runat="server" AssociatedControlID="txtTaxId" CssClass="DefaultLabelCaption">Tax ID:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="txtTaxId" runat="server" CssClass="DefaultTextBox TextboxWidth" MaxLength="30"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="TaxIdRequired" runat="server" ControlToValidate="txtTaxId" Display="Dynamic" ErrorMessage="Tax ID is required." SetFocusOnError="True" ToolTip="Tax ID is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                                <asp:CustomValidator ID="cvalTaxId" runat="server" ErrorMessage="Tax ID has already been registered." onservervalidate="cvalTaxId_ServerValidate" ControlToValidate="txtTaxId" SetFocusOnError="True" ValidationGroup="CreateUserWizard1" >*</asp:CustomValidator>
                                            </td>
                                        </tr>
                                        <tr style="display: none;">
                                            <td align="right">
                                                <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question" CssClass="DefaultLabelCaption">Security Question:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="Question" runat="server" CssClass="DefaultTextBox TextboxWidth"></asp:TextBox>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr style="display: none;">
                                            <td align="right">
                                                <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer" CssClass="DefaultLabelCaption">Security Answer:</asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="Answer" runat="server" CssClass="DefaultTextBox TextboxWidth"></asp:TextBox>
                                            </td>
                                            <td>
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center" colspan="2">
                                                &nbsp;
                                                </td>
                                            <td align="center">
                                                &nbsp;
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center" colspan="2" style="color: Red;">
                                                <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                                                <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="CreateUserWizard1" />
                                            </td>
                                            <td align="center" style="color: Red;">
                                                &nbsp;
                                            </td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </asp:CreateUserWizardStep>
                            <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
                                <ContentTemplate>
                                    <table border="0">
                                        <tr>
                                            <td align="center">
                                                Complete
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Your account has been successfully created.
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="right">
                                                <asp:Button ID="ContinueButton" runat="server" CausesValidation="False" CommandName="Continue" Text="Continue" ValidationGroup="CreateUserWizard1" OnPreRender="StepNextButton_PreRender" />
                                            </td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </asp:CompleteWizardStep>
                        </WizardSteps>
                    </asp:CreateUserWizard>
                </fieldset>
            </td>
        </tr>
    </table>
</asp:Content>

Why would only this validation stop working?

  • 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-17T15:42:25+00:00Added an answer on May 17, 2026 at 3:42 pm

    Change the validation group top match that used by other validation controls in the wizard: “CreateUserWizard1”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one text box on that text box i am using required field
I have an Asp.net text box that is being auto populated by javascript using
I have a custom composite control that contains a text box, some validators, as
I have a text box that retrieve email from membership table in database. User
I have a text box that contains lines of data similar to this: sheep
I have a text box that is going to be populated with a comma
I have a text box that accepts integers, and I need it to run
I have a text box that will allow the user to enter multiple authors
I have a rich text box that is being updated with log information. There
I have a C# form that has a text box that needs to constantly

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.