Reputation: 26366
Is there any way to cancel OnTextChanged postback when it meets certain condition at code behind without using javascript??
Upvotes: 0
Views: 488
Reputation: 26531
you just contradicted yourself:
cancel OnTextChanged postback
and
when it meets certain condition at code behind
you can't get to code behind unless you PostBack
p.s. what's the problem with using javascript? give more details on your scenario, and you might get some help here.
Upvotes: 1
Reputation: 180788
Since you don't want to do it client-side, you would have to use OnTextChanged in codebehind on the server side, but by then it's too late; the postback has already occurred.
So you can't cancel the postback, but you can redisplay the page.
Upvotes: 0