Welcome to MSDN Blogs Sign in | Join | Help

Matt Gibbs blog

ASP.NET and ASP.NET AJAX
ASP.NET AJAX Validators

ASP.NET AJAX provides new APIs for registering script with the ScriptManager.  Using these APIs allows controls to work well with partial rendering.  Without them, controls placed inside an UpdatePanel won't work as expected. In previous CTP releases of ASP.NET AJAX, we had a set of validator controls that derived from the v2.0 controls and used the new APIs. This made them work well with ASP.NET AJAX. WindowsUpdate will soon include a version of System.Web that can take advantage of the new APIs.  So the new controls which would have been redundant have been removed.  However, the update isn't available yet and ASP.NET AJAX has been released.  So, in the short-term, the source code for a set of custom validator controls that work with partial rendering is available here.

The .zip file includes a solution and .csproj file as well as the compiled DLL.  Just put the DLL in the /bin directory of your application and include the following <tagMapping section in the pages section of the web.config.

      <tagMapping>
        <add tagType="System.Web.UI.WebControls.CompareValidator"           mappedTagType="Sample.Web.UI.Compatibility.CompareValidator, Validators, Version=1.0.0.0"/>
        <add tagType="System.Web.UI.WebControls.CustomValidator"            mappedTagType="Sample.Web.UI.Compatibility.CustomValidator, Validators, Version=1.0.0.0"/>
        <add tagType="System.Web.UI.WebControls.RangeValidator"             mappedTagType="Sample.Web.UI.Compatibility.RangeValidator, Validators, Version=1.0.0.0"/>
        <add tagType="System.Web.UI.WebControls.RegularExpressionValidator" mappedTagType="Sample.Web.UI.Compatibility.RegularExpressionValidator, Validators, Version=1.0.0.0"/>
        <add tagType="System.Web.UI.WebControls.RequiredFieldValidator"     mappedTagType="Sample.Web.UI.Compatibility.RequiredFieldValidator, Validators, Version=1.0.0.0"/>
        <add tagType="System.Web.UI.WebControls.ValidationSummary"          mappedTagType="Sample.Web.UI.Compatibility.ValidationSummary, Validators, Version=1.0.0.0"/>
      </tagMapping>
 

 

Posted: Tuesday, January 23, 2007 2:23 PM by mattgi
Filed under:

Attachment(s): Validators.zip

Comments

LA.NET [EN] said:

In previous releases, AJAX extensions extended the validation controls introduced by ASP.NET in order

# January 24, 2007 3:50 AM

mhildreth said:

RE: "WindowsUpdate will soon include a version of System.Web that can take advantage of the new APIs"...

I'm suprised to hear this. Can you elaborate on this? When will this update be available? Will we have to change our references to the existing System.Web.dll and recompile? Can you provide a source for more information on this change?

# January 24, 2007 9:36 AM

ScottGu's Blog said:

Below are a few links to some ASP.NET AJAX 1.0 resources, and answers to a few common questions I've

# January 25, 2007 3:54 AM

Sontek (John M. Anderson) said:

ASP.NET AJAX Validator Controls

# February 1, 2007 1:20 PM

O impossível eu faço agora, milagre demora um pouco mais! said:

Acabamos de nos deparar com um "probleminha" do ASP.NET AJAX 1.0 em um projeto para um grande cliente...

# February 10, 2007 9:55 AM

Atteint de Javascriptite aigüe said:

Si vous décidez d'utiliser des contrôles de validation dans un UpdatePanel il se peut que vous rencontriez

# February 17, 2007 7:06 PM

Dennes said:

Durante os betas do Atlas, houve problemas com os validadores, problemas de funcionamento deles...

# February 23, 2007 5:44 PM

ASP.NET said:

Microsoftu se podařil pozoruhodný kousek, standardní validátory ASP.NET 2.0 nefungují korektně uvnitř

# March 5, 2007 5:50 AM

Ramseur's Rainbow Portal 2.0 Blog said:

This issue actually affects anyone using validators in their applications that went from RC to the final.

# March 9, 2007 4:27 PM

Next Step Place said:

Fico sempre feliz em ver novos artigos e assuntos sobre AJAX.NET em nossa língua. Algumas das...

# March 19, 2007 7:51 PM

Digging My Blog - Dan Hounshell said:

I got the following Javascript error a couple of days ago that I had not seen before: Sys.ArgumentUndefinedException:

# March 21, 2007 12:22 AM

Laurent Kempé said:

If you are using ASP.NET Validators in UpdatePanel consider the post of Matt Gibbs : " ASP.NET AJAX Validators

# March 26, 2007 5:30 PM

Blog de todos said:

En el release final de AJAX ASP.NET se les olvid&oacute; poner los controles de compatibilidad entre

# March 30, 2007 4:22 PM

Adlai Maschiach said:

Another nice link regarding AJAX ASP.NET AJAX Validators

# April 1, 2007 6:07 AM

Blog de Oskar Alvarez said:

Hoy me he encontrado con el siguiente error cuando he incluido un Validator callout extender en un UpdatePanel

# May 10, 2007 6:03 AM

Kyle Beyer said:

Some changes of note from the ASP.NET AJAX 1.0 RC to RTM release; some of which may break your application

# May 24, 2007 8:49 PM

idunno.org said:

asp.net validators for ajax, finally, sort of, maybe.

# June 27, 2007 4:21 AM

The Pavement said:

Validation Summary Control Not Playing Nicely With Ajax

# July 19, 2007 7:46 AM

ASP.NET AJAX Forum Posts said:

Currently we are facing the issue that the ValidationSummary used in ASP.NET 2 using Ajax, having ShowMessageBox

# July 20, 2007 12:02 PM

ASP.NET AJAX Toolkit Forum Posts said:

I need to know how to make validation controls with ajax. I have founf this link but had give me some

# July 30, 2007 7:23 AM

ASP.NET AJAX Forum Posts said:

I need to know how to make validation controls especially requried field one with ajax. I have found

# July 30, 2007 10:50 PM

ASP.NET AJAX Toolkit Forum Posts said:

Hi folks.... I am trying to use Update Panel, i included one of my dropdown into update panel which is

# August 7, 2007 9:40 AM

ASP.NET AJAX Forum Posts said:

I have a page where I have two UpdatePanels, one contains a GridView bound to a collection and the other

# September 5, 2007 9:43 PM

nacarat said:

介绍

ASP.NETAJAX就5个控件,分别是ScriptManager、ScriptManagerProxy、UpdatePanel、UpdateProgress和Timer。先简单地过一下。

...

# October 3, 2007 4:52 AM

Yo sólo pasaba por aquí pero ya que estoy.... said:

Tratando de usar controles de validaci&#243;n dentro de un UpdatePanel no consegu&#237;amos que la validaci&#243;n

# November 14, 2007 2:30 PM

Corey's .NET Tip of the Day said:

In previous releases of ASP.NET AJAX, Microsoft had created a series of Validators that were compatible

# January 23, 2008 7:58 PM

Atteint de JavaScriptite Aiguë [Cyril Durand] said:

Si vous décidez d'utiliser des contrôles de validation dans un UpdatePanel il se peut que vous rencontriez

# February 2, 2008 6:30 AM

ASP.NET AJAX Toolkit Forum Posts said:

Hi there I&#39;m using the ValidatorCalloutExtender in many of my pages, along with RequiredFieldValidator

# February 18, 2008 6:39 AM

ASP.NET AJAX Toolkit Forum Posts said:

Hi all... this is my first post so i&#39;m unsure if this is the correct place for this question. However

# February 18, 2008 10:53 AM

rox19840702 said:

ASP.NET AJAX 1.0资源连接以及对一些常见问题的答复

# February 27, 2008 11:40 AM

Suresh Behera said:

If you have multiple validation control and using ValidatorCalloutExtender,You might have exprience that

# March 13, 2008 10:12 AM

秋天 said:

ASP.NETAJAX(1)-简单地过一下每个控件(ScriptManager、ScriptManagerProxy、UpdatePanel、UpdateProgress和Timer) ...

# March 18, 2008 5:21 AM

noesis pedia said:

Postback not working in an update panel having validators

# March 27, 2008 12:14 AM

.NET con oskar said:

Hoy me he encontrado con el siguiente error cuando he incluido un Validator callout extender en un UpdatePanel

# April 15, 2008 9:45 AM
Anonymous comments are disabled
Page view tracker