Articles → JavaScript → _Dopostback In Javascript

_Dopostback In Javascript






Purpose





Example






Picture showing the rendered html of the web page without _dopostback function




Picture showing the rendered html of the web page with _dopostback function





More Info About _doPostBack




  1. eventTarget → ID of the control that triggers the postback
  2. 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




Posted By  -  Karan Gupta
 
Posted On  -  Friday, May 21, 2010

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250