Clear all fields in ASP.net form

前端 未结 7 918
忘掉有多难
忘掉有多难 2020-12-13 20:20

Is there an easy way to reset all the fields in a form?

I have around 100 controls in my asp.net form and there are submit and reset buttons.

How do I make a

7条回答
  •  南笙
    南笙 (楼主)
    2020-12-13 21:05

    The best option from my side would be

    Response.Redirect(Request.RawUrl);
    

    Just add this code on the cancel or reset button of your asp.net control.

提交回复
热议问题