requiredfield indicators

V

venky

I have a question.

I have two requiredfield indicators in my asp.net page and i have two
buttons like getnextlead and getcustomer.

I want the first requiredfieldindicator to be on for getnextleadbutton
but not for getcustomer button and second indicator active for
getcustomer button but not for getnextleadbutton.
can anyone tell me how to do this?


venky
 
M

Marina

I don't think you can do that. You have to get a custom validator and write
your own client side function to figure this out.
 
P

Peter Blum

ASP.NET 2.0 will offer a solution called Validation Groups. It lets you
assign a group name to the submit button and the validators it fires. Since
ASP.NET 2.0 is not ready yet, here are your choices:

1. Use server-side only validation on submit like this:
- Set CausesValidation=false
- In the submit button's Click method, call Validate() on each validator
that should be fired. Then test the IsValid property on each validator. If
all are true, save.

2. Use a third party validation system that already has validation groups. I
wrote one: Professional Validation And More
(http://www.peterblum.com/vam/home.aspx). My efforts go far beyond
validation groups because Microsoft's validators have so many limitations
and don't address common requests, like setting the background color of the
field with the error or client-side validation on Mozilla-based browsers.


--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top