user279521
user279521

Reputation: 4807

reset button is not working in asp.net

I have 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.

Upvotes: 2

Views: 2648

Answers (2)

JP Hellemons
JP Hellemons

Reputation: 6047

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

Upvotes: 1

Nimesh Madhavan
Nimesh Madhavan

Reputation: 6318

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.

Upvotes: 5

Related Questions