是否有清除ASP.NET表单的简便方法? [英] Is there an easy way to clear an ASP.NET form?
本文介绍了是否有清除ASP.NET表单的简便方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有一种简单的方法来重置asp.net表单中的所有文本字段-例如html控件的重置按钮?
is there an easy way to reset ALL text fields in an asp.net form - like the reset button for html controls?
推荐答案
取决于您对reset的定义.进行此类操作的一种简单方法可能是在代码后面添加一个按钮:
Depends on your definition of reset. A trivial way to do something like this could be a button with codebehind:
Response.Redirect(Request.Url.PathAndQuery, true);
或其变体.
这篇关于是否有清除ASP.NET表单的简便方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文