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

Asp Validator(RegularExpressionValidator) not working with ScriptManager

3 Answers 486 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Velkumar
Top achievements
Rank 2
Velkumar asked on 25 Aug 2011, 11:15 AM
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

3 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 31 Aug 2011, 09:27 AM
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 >>

0
Velkumar
Top achievements
Rank 2
answered on 15 Sep 2011, 07:51 AM
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
0
Simon
Telerik team
answered on 20 Sep 2011, 11:29 AM
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
Tags
ScriptManager and StyleSheetManager
Asked by
Velkumar
Top achievements
Rank 2
Answers by
Simon
Telerik team
Velkumar
Top achievements
Rank 2
Share this question
or