Is it OK to use __doPostBack()?

前端 未结 5 1875
轻奢々
轻奢々 2020-12-17 10:25

Is it OK to use __doPostBack() or it is not recommended because it is generated from ASP.Net and we are not sure if they changed it in a next version of ASP.Net

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-17 11:06

    They probably won't change it, but why call it directly?
    I think it's a better strategy to trigger the event (a button click for example) and let the control trigger the postback.

    I you do need to trigger the postback directly it's recommended to use the Page.ClientScript functions tenfour described.

提交回复
热议问题