Refresh Form

  • Thread starter Thread starter Amy Snyder
  • Start date Start date
A

Amy Snyder

Probably a very simple questions but...

I am playing around with ASP.NET for the first time and put together my
first page that has a few text boxes and listboxes. I like the way
values are retained in the controls after submitting to the page, but
how can I clear them? I put a Reset button on the page but it does
nothing.

Thanks
 
hello, what do you mean by "i put a reset button but it
does nothing"???....

anyway, say that you have a textbox called tb1, and a
pushbutton , inside the button handler you may try
tb1.Text = "" it will clear the text; for the listbox you
can use the items property: listbox1.Items.Clear()

greetings, daniel.
 
I am a newbie and was using the old

<input type=reset name=btnReset value=Reset>

that clears all controls of a form when clicked. You mean in .NET I
would have to explicitly clear each and every control on the form? That
seems like we are moving backward.

Thanks.
 
Back
Top