title: asp.net button - JS click does not work
body: <p>I am trying to call from JS to C# function. I can not use ajax. I have tried to create a ASP.NET button when it clicked it calls the C# function and call the click function from JS:</p>
  
  <p>On HTML:</p>
  
  <pre><code>&lt;asp:Button runat="server" ID="UploadButton" OnClick="Upload_Click" /&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>alert("Before CLICK");
  document.getElementById("UploadButton").click();
  alert("After CLICK");
  </code></pre>
  
  <p>ASP.NET:</p>
  
  <pre><code>protected void Upload_Click(object sender, EventArgs e)
  {
      //CODE
  }
  </code></pre>
  
  <p>The problem is that the click event from JS does not working. I have tried to write after the first line of the JS code an alert to see if the code rich to that line but I can only see <code>"After CLICK"</code>.</p>
  
  <p>I have seen this answer: <a href="https://stackoverflow.com/questions/17066672/buttons-click-command-not-working-in-chrome">Button&#39;s .click() command not working in Chrome</a> But I did not quite get this.</p>