nOp
nOp

Reputation: 301

Why asp.net validators prevent all other postback?

I have a page with some linkbuttons and a loginform validates by asp.net validators . when user click in linkbuttons validators prevent postback . linkbuttons are none of loginform business and validtors shouldnt validate when linkbuttons clicked .

What can i do?

tnx in advance...

Upvotes: 1

Views: 2243

Answers (3)

Chase Florell
Chase Florell

Reputation: 47387

You have two parts to work with.

  1. you can set a ValidationGroup
  2. you can set the controls that are not being used in the validation process to CausesValidation=False

Some info on ValidationGroups can be found on Scott Gu's blog
Some info on CausesValidation can be found at 4GuysFromRolla

These can work hand-in-hand or individually to achieve what you're looking for.

Upvotes: 3

Parv Sharma
Parv Sharma

Reputation: 12705

set a different group for the validators u dont want to be validated when button is clicked this can be done by "ValidationGroup" property

Upvotes: 3

Yiğit Yener
Yiğit Yener

Reputation: 5986

You can set CausesValidation property of the LinkButton to false, to prevent validation.

Upvotes: 3

Related Questions