Question about Validation controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a Web Form which has 2 text boxes: txtStartNo and txtEndNo. I ant to
make sure:
(1) Both txtStartNo and txtEndNo are entered by users
(2) Both values entered are integers and greater than 0
(3) The value of txtEndNo must be greater than txtStartNo

If I want to use validation controls come with ASP.Net, how many controls
and what kind of controls should I use?

TIA
 
I think you would need five.

1 RequiredFieldValidator for each text box.
1 RegularExpressionValidator for each to make sure that it is the integer >
0.
1 ComparisonValidator to make sure that the comparison is done as you wish.

HTH.
 
Back
Top