i must add CausesValidation=“False” to every ASP Button to work, why?

前端 未结 1 1536
别跟我提以往
别跟我提以往 2020-12-21 05:09

Hello i have a Big ASP Page and i must set in every ASP Button this:

CausesValidation=\"False\" 

to work. If don\'t it cant run a codebehin

相关标签:
1条回答
  • 2020-12-21 05:30

    It seems you are using Validation controls in your page. Your page must pass the validation before postback to server. Below is the functionality of CausesValidation property:

    • The CausesValidation property specifies if a page is validated when a Button control is clicked.

    • Page validation is performed when a button is clicked by default.

    • This property is mostly used to prevent validation when a cancel or reset button is clicked.

    0 讨论(0)
提交回复
热议问题