asp.net prevent form submission twice

前端 未结 4 581
庸人自扰
庸人自扰 2020-12-18 00:40

I have a web forms web application (asp.net 2.0). When the user submits the form I have the submit link actually going away so they can\'t submit it again. However, they cou

4条回答
  •  Happy的楠姐
    2020-12-18 00:57

    You can do several things. Store a boolean in ViewState. Check/set the property. Store the boolean in Session and check/set it.

    On postback, you set the value and if the value is true, prevent submission and raise/display an error.

提交回复
热议问题