This is a migrated thread and some comments may be shown as answers.

Validation kills all the links of the screen

1 Answer 45 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Uttam Dhakal
Top achievements
Rank 1
Uttam Dhakal asked on 25 Apr 2013, 03:11 PM
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"
 
                    ToolTip="EnterEmail">
 
                </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}$"
 
                    ControlToValidate="UserEmailInput">
 
                </asp:RegularExpressionValidator>
 
                <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">
 
                </telerik:RadButton>
 
                </td>

1 Answer, 1 is accepted

Sort by
0
Prathyusha
Top achievements
Rank 1
answered on 26 Apr 2013, 01:13 PM
Hi Uttam,

please put CausesValidation="False" for Radbutton.

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

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




Tags
General Discussions
Asked by
Uttam Dhakal
Top achievements
Rank 1
Answers by
Prathyusha
Top achievements
Rank 1
Share this question
or