0

In my Content page I have 4 different TextBox's which is used to enter phone number - Mobile, Office Phone, Office Mobile & Other. I have RegularExpressionValidator for each.

I want to make sure atleast one of the above 4 textbox's has entered a value. I didn't find any example or article on net showing this situation. One way I think is in Submit button click, before Page.IsValid call, call a function that checks that one of the control has valid value. If the function returns false, show MessageBox. Is their any other way using Validators or so to comfirm that one textbox out of 4 has a valid value.

What can be the best way to achieve this ?

Any help is highly appreciated.

Thankss

Tvd
  • 4,463
  • 18
  • 79
  • 125

1 Answers1

1

You can create a Custom Validator in ASP.NET.

This post should help you out.

asp.net required field validator for at least one textbox contains text

Community
  • 1
  • 1
Abdul Rehman Sayed
  • 6,532
  • 7
  • 45
  • 74