• Grumpy Wookie

  • Archives

  • Top Posts

  • Recent Visitors

  • Blog Stats

    • 348,746 hits

ASP.NET AJAX + Validators = trouble

Have been developing some funky pages using ASP.NET AJAX controls – trouble is, there is a mismatch in the “partial rendering” when dealing with validator controls.

The problem I’ve been having is as follows :

* Data row in gridview

* RequiredFieldValidators on the “footer” row – for inserting

* RequiredFieldValidator on the “edit” row – for editing (!)

Trouble is, that the validators for the “footer row” were showing (firing) when updating the “item” row.

The solution is to use some “patch” validator controls :

So, in the short-term, the source code for a set of custom validator controls that work with partial rendering is available here.

If you’re having the same problems, then click here for some info.  

It requires you to download some assemblies (DLLs) – and add a WEB.CONFIG file to your project, and all will be OK.

Hopefully there will be a permanent fix soon – not good to have to use “tagMapping” in the web.config – spaghetti !!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: