[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Shawn

1/22/2003 5:26:00 PM

In my project, there are 2 dropdown lists. The user can select either one of
them or both to start search.
Can anyone tell me how to validate these 2 fields? Can current VB.Net
validation control handle the situation?
Thanks.


3 Answers

Constance J. Petersen

1/22/2003 5:49:00 PM

0

Hi Shawn,

What validation rules do you need to enforce?

--
Constance Petersen
Build a great Web site: http://www.smart...
Learn ASP.NET: "Programming the Web with Visual Basic .NET"
http://amazon.com/exec/obidos/ASIN/1590590279/ref=nosim/constanc...


"Shawn" <x_zz@yahoo.com> wrote in message news:eJE0tLjwCHA.2584@TK2MSFTNGP11...
> In my project, there are 2 dropdown lists. The user can select either one of
> them or both to start search.
> Can anyone tell me how to validate these 2 fields? Can current VB.Net
> validation control handle the situation?


Shawn

1/22/2003 6:00:00 PM

0

I need Required Field Validator. If either of these 2 fields are filled,
then the validation is passed.
Any idea? Thanks.


"Constance J. Petersen" <constance@smartisans.com> wrote in message
news:#WCXHYjwCHA.1640@TK2MSFTNGP09...
> Hi Shawn,
>
> What validation rules do you need to enforce?
>
> --
> Constance Petersen
> Build a great Web site: http://www.smart...
> Learn ASP.NET: "Programming the Web with Visual Basic .NET"
> http://amazon.com/exec/obidos/ASIN/1590590279/ref=nosim/constanc...
>
>
> "Shawn" <x_zz@yahoo.com> wrote in message
news:eJE0tLjwCHA.2584@TK2MSFTNGP11...
> > In my project, there are 2 dropdown lists. The user can select either
one of
> > them or both to start search.
> > Can anyone tell me how to validate these 2 fields? Can current VB.Net
> > validation control handle the situation?
>
>


Constance J. Petersen

1/22/2003 9:47:00 PM

0

Hi Shawn,

Because the dropdown lists are not _both_ required, you can't use required field
validators. But you could use a custom validator. If you want client-side
validation as well as server-side, you would need to set the
ClientValidationFunction to the name of a client-side javascript--which you
would need to write yourself (as well as writing the server-side validation code
for the ServerValidate event handler).

--
Constance Petersen
Build a great Web site: http://www.smart...
Learn ASP.NET: "Programming the Web with Visual Basic .NET"

http://amazon.com/exec/obidos/ASIN/1590590279/ref=nosim/constanc...
"Shawn" <x_zz@yahoo.com> wrote in message news:uCs$qejwCHA.2332@TK2MSFTNGP09...
> I need Required Field Validator. If either of these 2 fields are filled,
> then the validation is passed.
> Any idea? Thanks.