m.edmondson
m.edmondson

Reputation: 30882

Validation spanning a group of text boxes

I'm trying to achieve the following: enter image description here

Where:

Is this beyond the scope of the ASP.NET Validation Controls? The only solution I can think of is writing some bespoke javascript (for client side) and backing that up with some server side code.

Upvotes: 3

Views: 343

Answers (2)

Edwin de Koning
Edwin de Koning

Reputation: 14387

One thing you can try is to have a CustomValidator(see here) check that both textboxes are not empty. Then validate both textboxes with a regular expression. The expression should check for either a valid entry OR a blank field.

Upvotes: 1

Pleun
Pleun

Reputation: 8920

You can create a CustomValidator and handle it there

http://msdn.microsoft.com/en-us/library/aa479013.aspx#aspnet-validateaspnetservercontrols_topic7

Upvotes: 0

Related Questions