Problem in using "RequiredFieldValidator"

  • Thread starter Thread starter Anup
  • Start date Start date
A

Anup

Hi Group,

In my project I m using "RequiredFieldValidator" for the validations of
text box,

There are two TextBox, say "txtBox1" and "txtBox2" now I want to make
either of TextBox mandatory, means atlest one should contain some text
and both should not be empty at a time.(I am using ASP.NET1.1 and C#
with Visual Studio 2003)

Can somebody suggest me any event on "RequiredFieldValidator" that can
do this or any other way to implement this.


Best Regards

Anup
 
Hi Group,
In my project I m using "RequiredFieldValidator" for the validations of
text box,

There are two TextBox, say "txtBox1" and "txtBox2" now I want to make
either of TextBox mandatory, means atlest one should contain some text
and both should not be empty at a time.(I am using ASP.NET1.1 and C#
with Visual Studio 2003)

Can somebody suggest me any event on "RequiredFieldValidator" that can
do this or any other way to implement this.


Best Regards

Anup

You can't use a RequiredFieldValidator, as it can handle just one field
at a time. You need a CustomValidator here, with a server-side handler
and possibly a client-side one as well. With this you can check
anything you want.

Hans Kesting
 

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

Back
Top