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.

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

Comments (40)

  1. LA.NET [EN] says:

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

  2. mhildreth says:

    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?

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

  4. ASP.NET AJAX Validator Controls

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

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

  7. Dennes says:

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

  8. ASP.NET says:

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

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

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

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

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

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

  14. Another nice link regarding AJAX ASP.NET AJAX Validators

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

  16. Kyle Beyer says:

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

  17. says: validators for ajax, finally, sort of, maybe.

  18. The Pavement says:

    Validation Summary Control Not Playing Nicely With Ajax

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

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

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

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

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

  24. nacarat says:



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

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

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

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

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

  30. rox19840702 says:

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

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

  32. 秋天 says:

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

  33. noesis pedia says:

    Postback not working in an update panel having validators

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

  35. hesen says:



  36. I&#39;ve been looking for hours to find a solution for this problem. Well first of all defining what

  37. Hi everyone. So, I post this topic because I have found many solutions or discussions about the way to

  38. Hi, I&#39;m having trouble getting an error message to appear for a failed validation within an UpdatePanel

  39. In my ASP.NET 2.0 app, I have two text fields that I&#39;m trying to use RegularExpressionValidators