Re: Validator message disappeared after post back
- From: wawang@xxxxxxxxxxxxxxxxxxxx (Walter Wang [MSFT])
- Date: Fri, 05 Jan 2007 02:55:04 GMT
Hi HipHop,
To make the validator work in or before a postback, the control who will
cause the postback must have CausesValidation set to true. Would you please
set the TextBox's CausesValidation to true and test it again:
<asp:TextBox ID="TextBox1" runat="server" CausesValidation="true"
AutoPostBack="true" OnTextChanged="TextBox1_TextChanged"></asp:TextBox></td>
I've tested it on my side using your code, if the CausesValidation is set
to true, the page will not be posted back since client-side validation is
enabled and the validation result is false, therefore it prevents the page
being posted back.
Regards,
Walter Wang (wawang@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- Re: Validator message disappeared after post back
- From: HipHop
- Re: Validator message disappeared after post back
- References:
- Re: Validator message disappeared after post back
- From: HipHop
- Re: Validator message disappeared after post back
- Prev by Date: Re: Validator message disappeared after post back
- Next by Date: Re: Validator message disappeared after post back
- Previous by thread: Re: Validator message disappeared after post back
- Next by thread: Re: Validator message disappeared after post back
- Index(es):
Relevant Pages
|