Erik Porter's Blog

Life and Development at Microsoft and Other Technology Discussions

News

    Validation Groups in ASP.NET 1.1

    So in ASP.NET 2.0 you can have validation groups so one set of fields can be validated when a certain button is clicked and another set of fields on the same page can be validated when another button is clicked.  I don't find myself needing this too often, but this is fantastic for when I do need it.  However, I've recently found a place in one of our applications where we needed it and we're using ASP.NET 1.1.  How to get around it?  This gem of an article describes a kind of cool rig for faking validation groups yourself.  It unfortunately will only work server-side and not client-side, but at least it's possible.
    Posted: Aug 15 2005, 02:48 PM by HumanCompiler | with 4 comment(s)
    Filed under: ,

    Comments

    M. Keith Warren said:

    Erik,

    Check out Peter Blums stuff, it does Validation groups and about 100 other things as well. As Scott Hanselman says, it is a 'reimagining' of the validation framework but it will change the way you make web sites.

    Worth the look.

    www.peterblum.com
    # August 15, 2005 6:08 PM

    Erik Porter said:

    I've actually glanced at them. I think for new projects I definitely will, but when you already have a project with tons and tons of pages I don't think it makes sense to flip out all the validators in the whole app when a little workaround like this works. Definitely thanks for mentioning Peter Blums stuff though!
    # August 15, 2005 6:12 PM

    M. Keith Warren said:

    FYI: He has a utility that converts everything.
    # August 15, 2005 7:39 PM

    Erik Porter said:

    ok, then i'll definitely have to give that a go...thanks!

    http://www.peterblum.com/VAM/Home.aspx
    # August 15, 2005 8:14 PM