Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation Crossover

Status
Not open for further replies.

JimmyFo

Programmer
Feb 14, 2005
102
US
Hi, I have a form that has multiple fields to be validated, but only parts need to be validated at one time - for example, the upload field doesn't need to be validated when the user is searching, and vice versa. But, when I try to upload, it triggers the search validation, which fails because - naturally - there is no text there.

How can I get around this?

Thanks,
James
 
Thanks, I took a look but that's not working for me.

Even if I put:

searchText.CausesValidation = False

in the page load, it still causes validation.

A quick look at what I'm trying to do:
Code:
<input textbox><asp:regexpvalidator ...><asp:button ...>

<input textbox2><asp:regexpvalidator ...><asp:button2 ...>[code]

The first text box is ALWAYS validated, but I only want it to be when the first button is clicked. What's interesting is that the second textbox is validated only if the second button is clicked, but not if the first is; the first textbox is validated regardless of either.

Thanks,
James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top