how to skip validation control

J

Joe Au

I create a (left) panel control to hold some image buttons, and a (right)
panel to hold some textboxes and corresponding validation controls. When I
press one of the button on the left panel, then the validatons takes place
on the right panel to show up the error messages. How can I skip these
validation if the user really want to leave the right panel?
Thanks.
 
G

Guest

The problem I see with this approach is that it will cancel all validation,
not just validation for the other panel. A thought would be to make the
panels iframes. That way they are completely independant of eachother.
Although this may not work for you.
 
C

Craig Deelsnyder

I create a (left) panel control to hold some image buttons, and a (right)
panel to hold some textboxes and corresponding validation controls. When
I
press one of the button on the left panel, then the validatons takes
place
on the right panel to show up the error messages. How can I skip these
validation if the user really want to leave the right panel?
Thanks.

ah, this is called validator grouping, and it's coming in ASP.NET 2.0.
For now, you either have to homegrow a solution or find a third-party
control (such as Peter's validators at
http://www.peterblum.com/VAM/Home.aspx) that usually cost money.

The easiest solution is to turn off client-side validation, as I assume
this is what you're talking about, and validate on the server side
instead. Otherwise I also did this myself for a project by hacking the
Javascript functions that Microsoft uses in

C:\Inetpub\wwwroot\aspnet_client\system_web\1_1_4322\WebUIValidation.js

for example, to enable/disable controls myself on button clicks.

The server side validation solution, you just check things like
Page.IsValid and validatorControl.IsValid to verify if errors are really
errors...
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top