Asp Validator(RegularExpressionValidator) not working with ScriptManager

4 posts, 0 answers
  1. Velkumar
    Velkumar avatar
    85 posts
    Member since:
    Apr 2011

    Posted 25 Aug 2011 Link to this post

    Hello,

    I have 2 asp textbox, 2 radtextbox and 4 asp RegularExpressionValidator   and one button in my page. If i have the radScriptmanager in this page validation will not work on button click and page will postback without validating it. If i remove the script manager from this page then validation will work on Button Click and page will not postback. Please give the solution for this problem
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 31 Aug 2011 Link to this post

    Hello Velkumar,

    I was unable to reproduce this problem with the latest version of Telerik.Web.UI and the following code:
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="BreaksValidation.aspx.cs"
        Inherits="_Default" %>
     
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <telerik:radscriptmanager id="ScriptManager1" runat="server">
        </telerik:radscriptmanager>
        <div>
            <asp:TextBox runat="server" ID="TextBox1" />
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox1"
                ErrorMessage="failed" ValidationExpression="abc">
            </asp:RegularExpressionValidator>
            <telerik:radtextbox id="RadTextBox1" runat="server"></telerik:radtextbox>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="RadTextBox1"
                ErrorMessage="failed" ValidationExpression="def">
            </asp:RegularExpressionValidator>
            <asp:Button Text="Submit" runat="server" />
        </div>
        </form>
    </body>
    </html>

    Could you please let me know which is the controls' assembly version with which you are testing?

    Greetings,
    Simon
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Velkumar
    Velkumar avatar
    85 posts
    Member since:
    Apr 2011

    Posted 15 Sep 2011 Link to this post

    we are using Telerik version 2008. We cannot change the version of the telerik assembly in the project.  I still got the problem in this version. So please give the solution for this problem.

    Thanks
    Velkumar
  5. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 20 Sep 2011 Link to this post

    Hello Velkumar,

    Unfortunately your version is three years old and we do not provide support for more than a year old versions. Please consider replacing RadScriptManager with ScriptManager if that solves the problem.

    Best wishes,
    Simon
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top