.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

AJAX Validation callout extenders firing when other buttons are pressed

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :ASP.Net

I have several buttons on a page, but have assigned some validators and AJAX validator callout extenders to one button in particular. However, the validator callout extenders seem to be firing even if I press a different button. I thought this was the point of setting a TargetControlID (for the valiator callout extender) and a ControlToValidate for the validator itself! Any suggestions as to what I'm doing wrong?

<asp:TextBox ID="tbNewDuration" runat="server" />   Duration <br />
<asp:RequiredFieldValidator ID="tbNewDurationRFV" ControlToValidate="tbNewDuration" ErrorMessage="Please enter a Duration value." Display="None" runat="server" />
<cc1:ValidatorCalloutExtender ID="tbNewDurationVCE1" runat="server"  TargetControlID="tbNewDurationRFV" />
<asp:RegularExpressionValidator ID="tbNewDurationREV" runat="server" Display="none" ControlToValidate="tbNewDuration" ErrorMessage="Please enter a number of 10 digits" ValidationExpression="^\d{10}$" />
<cc1:ValidatorCalloutExtender ID="tbNewDurationVCE2" runat="server" TargetControlID="tbNewDurationREV" />

View Complete Post

More Related Resource Links

Do Ajax Toolkit Extenders participate in server side validation?


If I use the extenders (for example mask edit) in place of some of the built in validators such as RegularExpressionValidator for exampe, will Page.Validate() still be called automatically and perform server side validation using the extenders?

Server validation is not firing if submited by Jquery $.ajax method


I am new in MVC.Using MVC2.MY create view is given below...

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcApplication1.Models.ExpenseCategory>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script src="<%=ResolveUrl("~/Scripts/jquery-1.4.1.min.js")%>" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
        function SaveExpenseCategory() {
            try {

                var requrl = "/ExpenseCategory/Create";
                var formID = "frmAddEC";
                var serdata = $(frmAddEC).serialize();


Cutting Edge: Customize Controls with AJAX Extenders, Part 2


This month Dino looks at AJAX control extenders again, adding more advanced features including masked editing and autocompletion.

Dino Esposito

MSDN Magazine February 2008

Cutting Edge: Customize Controls with AJAX Extenders


AJAX Extenders extend the behavior and features of ordinary Web controls so you can reduce postbacks and control input even better than with AJAX alone.

Dino Esposito

MSDN Magazine January 2008

Ajax.BeginForm with multiple buttons


can i have more than one AjaxOptions in Ajax.BeginForm targetting different controls?

Actually I want to exchange data between two listboxes placed in a single ajax.beginform.

How to do it..................help me.

AJAX Extenders in SharePoint 2010

Hello All, I have few WebParts from 2007 and I am trying to deploy them in 2010.  None of the extenders seem to be working. Initially I got the error: "Message: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll." I added the tag: <cc1:ToolkitScriptManager id="ScriptManager" runat="server"></cc1:ToolkitScriptManager> it went away. Now I am seeing: Message: 'Sys' is undefined Message: 'Type' is undefined Message: 'Sys.Extended.UI' is null or not an object Message: Sys.ArgumentException: Value is not the name of the type being registered or the name is a reserved word.Parameter name: typeName Can you please help me. Pradeep    

Ajax and Validation on Partial Views

I have a main page "Index". Index page has 2 partial views 1. "CategoryList"- list with bunch of checkboxes2. "Add Category" - 1 text field -"BlogCategoryName" with "create" buttonWhat i want to do is when someone types in a new "CategoryName" in the text field of "Add Category" partial view it would send via Ajax to AddCategory controller then it would return a new List and Update "CategoryList" on the index page.Questions:How would i achieve this? so that validation works (ie when CategoryName is blank it would return that partial view with validation) however when successfully validated it would return a new list and update the "CategoryList" partial view.What's the best approeach?would I use JSON or AJAX?thanks

AJAX Extenders not working

hi friends,I am trying to use some ajax extenders features like calendar extender, Textbox Watermark and every extender.It was all working in VS2008. But when from I installed VS 2010 Ultimate, none of them is working. Here is showing no error and no warning but its not working.This is What I am doingFile > New > WebsiteSet Target Platform 3.5 (Because my host does not support 4.0)Choose ASP.NET Website from Templates.(I have already added Ajax Toolkit, downloaded today from codeplex)And this is the code for Default.aspx file<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

Using AJAX Extenders To Make Client-Side Happy

I am developing a web application that needs to retrieve, display and write data to an SQL database.  I'm trying to use AJAX and Javascripts in order to populate fields, lists and data, and to have button and calendar controls on the page that can update the page without refreshing and losing the data page.  Therefore, it's necessary that I find ways to doing as much as possible (ideally, everything) client-side, without page refreshes. Now, for security purposes, I've heard that there's a method for retrieving a copy of all relevant data from SQL at loading time, keeping a copy of it, perhaps on a separate page, and send-retrieve-display this data on my page, and then, at Submission time, write this data back to the Server.  This is to minimize hits to the Server and to preserve data integrity.  I've heard that doing this is called using an Extender, but we can't find examples of how this works so far. Can anybody provide me with a code example of how this is done and what it looks like?  Trying to find out how this is done, and decide if it's practical. Any suggestions and questions are welcome.

How to make cause validation false for Show Edit buttons in Gridview control

  HI. I am having 2 (dept name, City)dropdownlist, 1 Save button once if we click the save then record will be displayed in grid (Gridview with ShowEditbutton =true and I have Edit logic in my page). But if I click on Edit button then if I try to update the value then it is firing a message "Select dept" because dept dropdown present in the page so I want to make cause validation false for Show Edit buttons (update and cancel). Pleaase tell me Thanks

Show Smart Tag is disabled. Cant get to Ajax Extenders

I installed VS 08. and then installed Ajax extensions 1.0. I also downloaded ajax control toolkit and added to my toolbox. And I placed scriptmanager on the designer. Now when I am trying to add functionality to standard button via smart tag option. I see this option disabled. how can I enable it and have extenders in play.   Thanks

how to do a ajax integrated validation in required field sharepoint newform.aspx

hi all, i have newform.aspx in sharpeoint list where in i have 2 cols which are reqd field. how would i make the server side validation without refreshing the page.. can i put it ajax update panel ?  how would i achieve this requirement.jayaraja

How to navigate through AJAX TabContainer Tabs using buttons


Hi Forumians,

In a web page i have 5 tabs from 1 st tab to 2 tab

i have to go by a linkbutton click not through header navigation

so i created a link button and in the button click event

i have written the code like below

protected void lnkproceceed2tab3_Click(object sender, EventArgs e)
        TabContainer1.ActiveTab = TabContainer1.Tabs[3];


its sitting in same tab i cant go to the next tab by a link button.

Kindly find a solution and tell me

Set focus on erronous control on validation inside ajax tabcontrol having 5 tab


Hiii.. Everybody

How to set the focus on textbox when requiredfield validator error mesage comes to action inside the ajax tabcontrol.The ajax tabcontrol is having 5 tabs.The submit button is in 5th tab .I have reqiredfield validator for textbox  in 1st tab.I want to set the focus on textbox if validation fails.Is it possible to get without postback????

Is there anyone can help me out ????

Thanks in advance

firing Validation rules under One way binding Mode


Can Validation Rules fire When binding Mode is set to OneWay.?

If No : Is is Because the validation rules fire only when the source property changes and hence under oneway binding the source never changes and so the rules never fire.

Is there a workaround to Fire the validation rules Except invoking the explicitly.( Because i have triggered the save button to be enabled only when ther's no validation errors, So makin the user click and explicitly firing rules is not what i want.)



Validation for Ajax Combobox control


for Ajax Combobox controls validation is not working.

Please help me out with quick solution 


Thank you




.Net custom user control buttons (events) not firing in Jquery Modal Popup


I have a custom control, that has takes some information from user and submit to the database. it is working fine in normal aspx pages. but when i display that custom user control in jQuery modal popup. The events does not fire or lets say the data is not submitted to the database.

any help on that?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend