Articles → JavaScript → _Dopostback In Javascript
_Dopostback In Javascript
Purpose
Example
More Info About _doPostBack
- eventTarget → ID of the control that triggers the postback
- eventArgument → contains any additional data associated with the control
Calling The _DoPostBack Function On Button Click
<script type = "text/javascript">
function ClickButton() {
return false;
} </script>
Button1.Attributes.Add("onclick", "return ClickButton();");
_doPostBack("TextBox1", "Test");
<script language = "javascript"
type = "text/javascript">
function ClickButton() {
_doPostBack("TextBox1", "Test");
return false;
} </script>
Try It