Asp.Net SQL Refresh page duplicate inserts?

前端 未结 4 1720
悲哀的现实
悲哀的现实 2021-01-24 16:51

I have a *.aspx page that contains a text box and a button. When the user enters information in to the textbox and clicks post, it inserts the data into my sql database. The iss

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-24 17:32

    Add Response.Redirect(Request.Url.ToString(), false); to your button event and that should solve the problem.

提交回复
热议问题