Re-setting controls on a web form
I have a Long form which I would like to be able to clear user entered info from.
I am not sure what the best way to do this is,
In the past I have had a button that re-directed to the same page, but I had to have the full URL in the redirect statement, is there a way of getting "this" url?
I have also had a whole load of
text1.text=""
text2.text=""
etc
etc
etc
but this is a pain to extend and primative!
How should I be doing this?
Cheers as ever!
Aidan
Tuesday, February 8, 2005
HttpContext.Current.Response.Redirect(HttpContext.Current.Request.Url.AbsoluteUri)
(above is from memory so may not be exact)
smallbiz
Tuesday, February 8, 2005
Thanks...
cut and paste worked :D
Aidan
Tuesday, February 8, 2005
Is there a reason a Reset button wouldn't do what you want it to?
Chris F
Wednesday, February 9, 2005
Recent Topics
Fog Creek Home
|