C J
C J

Reputation: 417

validation conrtol give's problem while clicked on button

i am developing a site in asp.net as front-end In my Form, i have a 3 text-box with validation control on it eg: requiredFieldValidator with joinnow button. and search button with 2 textbox with no validation control on it

when i click on search button it is asking me to fill the three text box for validation and it is not redirected to other page

i need that when i click on search button my form should redirect

Upvotes: 1

Views: 266

Answers (2)

C J
C J

Reputation: 417

solution for it is 

set the property of the search button as below 

CausesValidation="False" 

Upvotes: 1

Kendrick
Kendrick

Reputation: 3787

You need to set the ValidationGroup properties on your textbox that has the validation and the joinnow button to the same thing. When you click the button it will validate controls in its group, and thus not validate from the search button (which is in a different validation group implicitly)

Upvotes: 2

Related Questions