What is the meaning of __doPostBack function, and when is it used?

前端 未结 3 554
遥遥无期
遥遥无期 2021-01-13 21:15

I had problem triggering server side button click events so I found a solution on the net that I should do something like

  

        
3条回答
  •  深忆病人
    2021-01-13 21:53

    Check this article:

    Understanding the JavaScript __doPostBack Function

    This method is used to submit (post back) a form to the server and allows ASP.NET framework to call appropriate event handlers attached to the control that raised the post back.

    You usually (in simple scenarios) don't use the method directly - it is internally used by the controls you drop on the page.

    The parameters passed to this function are stored in a hidden field and picked up by ASP.NET framework on the server-side in order to find the control that raised the post back.

提交回复
热议问题