I'm pretty new to ASP.NET and so finding my way but I was wondering whether it's possible to set up a single general purpose OnServerValidate routine that triggers different logic and error messages. Something along these lines..
Excuse any typos - I'm just trying to illustrate the approach. I'd still like to be able to trigger the error message associated with the individual CustomValidator controls assuming I can't assign these in the same general purpose routine.
I accept that I may have missed the point completely!
Code:
Select Case Control.Name
Case "TxtBox1"
if ucase(TxtBox1.Text)<>TxtBox1.Value) then args.isvalid = False
Case "TxtBox2"
if Instr("a,c,d,e",TxtBox2.Text)<1 then args.isvalid = False
End Select
I accept that I may have missed the point completely!