On Sat, 7 Aug 2004 00:36:45 +0800, Joe Au <jo***@livingfaith.org.hk> wrote:
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_43 22\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...
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET