Register.aspx with validation bug or my error

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
12/21/2010 4:42:47 AM
Gravatar
Total Posts 1

Register.aspx with validation bug or my error

Dear,

I've been working on a mojoportal site (nice work on the cms system btw) and I've noticed something strange.

I added custom fields to the profile of a user and added validators from them on the register.aspx page.

Now whenever I try to add a user with an existing username or e-mail adres I don't get the errormessages for those errors.
I suspect I did something wrong but I can't really put my finger on it.

Help would be much appreciated :)

 

My register.aspx code is listed below.

 

<%@ Page Language="c#" CodeBehind="Register.aspx.cs" MasterPageFile="~/App_MasterPages/layout.Master"
    AutoEventWireup="false" Inherits="mojoPortal.Web.UI.Pages.Register" %>

<asp:Content ContentPlaceHolderID="leftContent" ID="MPLeftPane" runat="server" />
<asp:Content ContentPlaceHolderID="mainContent" ID="MPContent" runat="server">
    <mp:CornerRounderTop ID="ctop1" runat="server" />
    <asp:Panel ID="pnlRegister" runat="server" CssClass="panelwrapper register">
        <div class="modulecontent">
            <fieldset>
                <legend>
                    <mp:SiteLabel ID="lblRegisterLabel" runat="server" ConfigKey="RegisterLabel" UseLabelTag="false">
                    </mp:SiteLabel>
                </legend>
                <asp:Panel ID="pnlAuthenticated" runat="server" Visible="false">
                    <asp:Literal ID="litAlreadyAuthenticated" runat="server" />
                </asp:Panel>
                <asp:Panel ID="pnlRegisterWrapper" runat="server">
                    <asp:Panel ID="pnlStandardRegister" runat="server" CssClass="floatpanel">
                        <asp:CreateUserWizard ID="RegisterUser" runat="server" NavigationStyle-HorizontalAlign="Center">
                            <WizardSteps>
                                <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                                    <ContentTemplate>
                                        <asp:Panel ID="pnlRequiredProfilePropertiesUpper" runat="server">
                                        </asp:Panel>
                                        <asp:Panel ID="pnlUserName" runat="server" class="settingrow">
                                            <mp:SiteLabel ID="lblLoginName" runat="server" ForControl="UserName" CssClass="settinglabel"
                                                ConfigKey="RegisterLoginNameLabel"></mp:SiteLabel>
                                            <asp:TextBox ID="UserName" runat="server" TabIndex="10" Columns="30" MaxLength="50" />
                                        </asp:Panel>
                                        <div class="settingrow">
                                            <mp:SiteLabel ID="lblRegisterEmail1" runat="server" ForControl="Email" CssClass="settinglabel"
                                                ConfigKey="RegisterEmailLabel"></mp:SiteLabel>
                                            <asp:TextBox ID="Email" runat="server" TabIndex="10" Columns="30" MaxLength="100"></asp:TextBox>
                                        </div>
                                        <div class="settingrow">
                                            <mp:SiteLabel ID="lblRegisterPassword1" runat="server" ForControl="Password" CssClass="settinglabel"
                                                ConfigKey="RegisterPasswordLabel"></mp:SiteLabel>
                                            <asp:TextBox ID="Password" runat="server" TabIndex="10" Columns="30" TextMode="Password"
                                                MaxLength="20"></asp:TextBox>
                                        </div>
                                        <div class="settingrow">
                                            <mp:SiteLabel ID="lblRegisterConfirmPassword1" runat="server" ForControl="ConfirmPassword"
                                                CssClass="settinglabel" ConfigKey="RegisterConfirmPasswordLabel"></mp:SiteLabel>
                                            <asp:TextBox ID="ConfirmPassword" runat="server" TabIndex="10" Columns="30" TextMode="Password"
                                                MaxLength="20"></asp:TextBox>
                                        </div>
                                        <div class="settingrow" id="divQuestion" runat="server">
                                            <mp:SiteLabel ID="SiteLabel2" runat="server" ForControl="Question" CssClass="settinglabel"
                                                ConfigKey="RegisterSecurityQuestion"></mp:SiteLabel>
                                            <asp:TextBox ID="Question" runat="server" TabIndex="10" Columns="45" />
                                        </div>
                                        <div class="settingrow" id="divAnswer" runat="server">
                                            <mp:SiteLabel ID="SiteLabel1" runat="server" ForControl="Answer" CssClass="settinglabel"
                                                ConfigKey="RegisterSecurityAnswer"></mp:SiteLabel>
                                            <asp:TextBox ID="Answer" runat="server" TabIndex="10" Columns="45" />
                                        </div>
                                        <asp:Panel ID="pnlRequiredProfileProperties" runat="server">
                                        </asp:Panel>
                                        <div class="settingrow">
                                            <asp:ValidationSummary ID="vSummary" runat="server" ValidationGroup="Register" />
                                            <asp:RequiredFieldValidator ControlToValidate="UserName" ID="UserNameRequired" runat="server"
                                                Display="None" ValidationGroup="Register"></asp:RequiredFieldValidator>
                                            <asp:RequiredFieldValidator ControlToValidate="Email" ID="EmailRequired" runat="server"
                                                Display="None" ValidationGroup="Register"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="EmailRegex" runat="server" ControlToValidate="Email"
                                                Display="None" ValidationExpression="^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$"
                                                ValidationGroup="Register"></asp:RegularExpressionValidator>
                                            <asp:RequiredFieldValidator ControlToValidate="Password" ID="PasswordRequired" Display="None"
                                                runat="server" ValidationGroup="Register"></asp:RequiredFieldValidator>
                                            <asp:CustomValidator ID="PasswordRulesValidator" runat="server" ControlToValidate="Password"
                                                Display="None" ValidationGroup="Register"></asp:CustomValidator>
                                            <asp:RegularExpressionValidator ID="PasswordRegex" runat="server" ControlToValidate="Password"
                                                Display="None" ValidationGroup="Register"></asp:RegularExpressionValidator>
                                            <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" ID="ConfirmPasswordRequired"
                                                runat="server" Display="None" ValidationGroup="Register"></asp:RequiredFieldValidator>
                                            <asp:CompareValidator ControlToCompare="Password" ControlToValidate="ConfirmPassword"
                                                ID="PasswordCompare" runat="server" Display="None" ValidationGroup="Register"></asp:CompareValidator>
                                            <asp:RequiredFieldValidator ControlToValidate="Question" ID="QuestionRequired" runat="server"
                                                Display="None" ValidationGroup="Register"></asp:RequiredFieldValidator>
                                            <asp:RequiredFieldValidator ControlToValidate="Answer" ID="AnswerRequired" runat="server"
                                                Display="None" ValidationGroup="Register"></asp:RequiredFieldValidator>

                                        </div>
                                        <div class="regerror">
                                            <portal:mojoLabel ID="lblErrorMessage" runat="server" CssClass="txterror" />
                                        </div>
                                        <div id="divAgreement" runat="server">
                                        </div>
                                       
                                    </ContentTemplate>
                                </asp:CreateUserWizardStep>
                                <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
                                    <ContentTemplate>
                                        <asp:Panel ID="pnComplete" runat="server">
                                        </asp:Panel>
                                        <asp:Literal ID="CompleteMessage" runat="server" />
                                        <div>
                                            <asp:Button ID="ContinueButton" runat="server" CausesValidation="False" CommandName="Continue"
                                                ValidationGroup="CreateUserWizard1" />
                                        </div>
                                    </ContentTemplate>
                                </asp:CompleteWizardStep>
                            </WizardSteps>
                        </asp:CreateUserWizard>
                        <asp:Literal ID="litTest" runat="server" />
                    </asp:Panel>
                    <asp:Panel ID="pnlThirdPartyAuth" runat="server" Visible="false" CssClass="clearpanel thirdpartyauth">
                        <h2>
                            <asp:Literal ID="litThirdPartyAuthHeading" runat="server" /></h2>
                        <asp:Panel ID="pnlWindowsLiveID" runat="server" CssClass="windowslivepanel" Visible="false">
                            <asp:HyperLink ID="lnkWindowsLiveID" runat="server" NavigateUrl="~/Secure/RegisterWithWindowsLiveID.aspx" />
                            <br />
                        </asp:Panel>
                        <asp:Panel ID="divLiteralOr" runat="server" Visible="false" CssClass="clearpanel orpanel">
                            <asp:Literal ID="litOr" runat="server" /><br />
                            <br />
                        </asp:Panel>
                        <asp:Panel ID="pnlOpenID" runat="server" CssClass="openidpanel" Visible="false">
                            <asp:HyperLink ID="lnkOpenIDRegistration" runat="server" NavigateUrl="~/Secure/RegisterWithOpenID.aspx" />
                           
                            <br />
                        </asp:Panel>
                        <asp:Panel ID="pnlRpx" runat="server" CssClass="openidpanel" Visible="false">
                            <portal:OpenIdRpxNowLink ID="rpxLink" runat="server" />
                            <br />
                        </asp:Panel>
                    </asp:Panel>
                </asp:Panel>
            </fieldset>
        </div>
    </asp:Panel>
    <mp:CornerRounderBottom ID="cbottom1" runat="server" />
</asp:Content>
<asp:Content ContentPlaceHolderID="rightContent" ID="MPRightPane" runat="server" />
<asp:Content ContentPlaceHolderID="pageEditContent" ID="MPPageEdit" runat="server" />

You must sign in to post in the forums. This thread is closed to new posts.