title: Uncaught ReferenceError:doPostBack is not defined
body: <p>I am getting the __doPostBack is not defined and I have tried the fixes, yet it still remains this is using jQuery-ui and jQuery.  My Delete button originally does this.</p>
  
  <pre><code>&lt;td&gt;&lt;a href="@Url.Action("DeleteUser", "Home", new {id = testUser.TestUserId})"&gt;&lt;i class="fa fa-trash fa-lg text-primary"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <p>I wanted to add a confirmation screen for when that button was clicked.  The screen does pop up and when I click No it closes.  When I click yes I get the error "Uncaught ReferenceError:doPostBack is not defined"
  My script doesn't have an input, but I try adding one, but nothing seem to change.
  my code is as follows</p>
  
  <pre><code>    &lt;script src="~/Scripts/jquery-3.3.1.min.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/jquery-3.3.1.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/jquery-ui-1.12.1.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/jquery-ui-1.12.1.min.js"&gt;&lt;/script&gt;
  
  &lt;link href="~/Content/themes/jquery-ui.css" rel="stylesheet" /&gt;
  &lt;link href="~/Content/bootstrap.css" rel="stylesheet" /&gt;
  
  
  &lt;form id="form1" runat="server" document.forms[0].submit()&gt;
      &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;
      &lt;/script&gt;
      &lt;script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"&gt;
      &lt;/script&gt;
      &lt;link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/blitzer/jquery-ui.css"
            rel="stylesheet" type="text/css" /&gt;
      &lt;script type="text/javascript"&gt;
  
          $(function () {
              $("[id*=btnDelete]").removeAttr("onclick");
              $("#dialog").dialog({
                  modal: true,
                  autoOpen: false,
                  title: "Confirmation",
                  width: 350,
                  height: 160,
                  buttons: [
                      {
                          id: "Yes",
                          text: "Yes",
                          click: function () {
                              $("[id*=btnDelete]").attr("rel", "delete");
                              $("[id*=btnDelete]").click();
                          }
                      },
                      {
                          id: "No",
                          text: "No",
                          click: function () {
                              $(this).dialog('close');
                          }
                      }
                  ]
              });
              $("[id*=btnDelete]").click(function () {
                  if ($(this).attr("rel") != "delete") {
                      $('#dialog').dialog('open');
                      return false;
                  } else {
                      _doPostBack(this, '');
                  }
              });
          });
      &lt;/script&gt;
      &lt;asp:Button ID="btnDelete" runat="server" Text="Delete" OnClick="DeleteRecord" UseSubmitBehavior="False"/&gt;
  
      &lt;div id="dialog" style="display: none" align="center"&gt;
          Do you want to delete this record?
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>the line that seems to be flagged for the error is </p>
  
  <pre><code>&lt;div id="dialog1"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I believe I have run out of places to look.</p>