开发者

reset button is not working in asp.net

开发者 https://www.devze.com 2023-01-02 18:41 出处:网络
I h开发者_C百科ave an asp.net web page that displays data that was returned from the database. However, when I attempt to click \"Reset\" (<input id=\"btnReset\" type=\"reset\" value=\"Clear\" />

I h开发者_C百科ave an asp.net web page that displays data that was returned from the database. However, when I attempt to click "Reset" (<input id="btnReset" type="reset" value="Clear" />) the button doesn't do anything.


The reset button will only erase the data the user entered after the page was rendered. So if you dont make any changes in the page, the reset button wont do anything.

Also, Reset is a client side operation. it wont post-back the page to the server.


you are probably looking for this

<asp:Button id="btnReset" Text="reset it!" runat="server" onclick="btnReset_onClick" />

so you can do stuff in your codebehind

0

精彩评论

暂无评论...
验证码 换一张
取 消