c# - Button does not work after Validation -
i have 1 textbox , 2 buttons on update panel.
<asp:button id="button_search" runat="server" text="search" onclick="button_search_click" validationgroup="personalinfogroup"/> <asp:button id="button_clear" runat="server" text="clear" onclick="button_clear_click" validationgroup="clear" causesvalidation="false"/>
i validate textbox using compare validator.
<asp:comparevalidator id="validator" runat="server" controltovalidate="textbox_trackingno" operator="datatypecheck" type="integer" errormessage="value must number" validationgroup="personalinfogroup" />
page load event;
protected void page_load(object sender, eventargs e) { if (ispostback) page.validate(); loaddata(this, new eventargs()); }
the validation working fine. when validation error message displayed, not fire clear button click event. instead of click event hits page load.
please me.
Comments
Post a Comment