How to clear all form fields from code-behind?

Posted by Slauma on Stack Overflow See other posts from Stack Overflow or by Slauma
Published on 2010-04-10T14:52:48Z Indexed on 2010/04/10 15:03 UTC
Read the original article Hit count: 268

Filed under:
|

HTML has an input button type to reset all fields in a form to their initial state in one step: <input type="reset" ... />.

Is there a similar simple way to reset all form fields of an aspx page from code-behind? Or is it necessary to reset all controls one by one with TextBox1.Text=string.Empty, TextBox2.Text=string.Empty, etc. ?

Thanks in advance!

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about webforms