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

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -