Validation kills all the links of the screen

2 posts, 0 answers
  1. Uttam Dhakal
    Uttam Dhakal avatar
    29 posts
    Member since:
    Jan 2010

    Posted 25 Apr 2013 Link to this post

    I am using an email validator for one input textbox. 
    the validation works but the problem is i cannot move to any other pages without clearing the validation. 

    I opened the page if there is not valid email i cannot browse to my navigation links to other pages. 
    can this validation only work when the button is clicked.  the button should not be clicked before the email input is validated. but i should be able to leave this page and navigate to some other page and come back later with correct email address

    here is the code.
    <telerik:RadTextBox ID="UserEmailInput"  runat="server" CausesValidation="True" ValidationGroup="UserInput"
                    </telerik:RadTextBox><asp:RegularExpressionValidator ID="emailValidator" runat="server"
                        Display="Dynamic" ErrorMessage="<br/> Please, enter valid e-mail address." ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"
                    <asp:RequiredFieldValidator ID="Requiredfieldvalidator1" runat="server" Display="Dynamic"
                        ControlToValidate="UserEmailInput" ErrorMessage="<br/>Please, enter an e-mail!"></asp:RequiredFieldValidator>
                    <br />
                    <br />
                     <telerik:RadButton ID="UserReport" runat="server" Text="Run Report" OnClick="UserReport_Click">
  2. Prathyusha
    Prathyusha avatar
    10 posts
    Member since:
    Oct 2012

    Posted 26 Apr 2013 Link to this post

    Hi Uttam,

    please put CausesValidation="False" for Radbutton.

    <telerik:RadButton ID="UserReport" runat="server" Text="Run Report" CausesValidation="False" OnClick="UserReport_Click">

    It Show the Validation and as well as, navigate to some Otherpage.

Back to Top