I have found StackOverFlow answers and other resources saying that you can click on a hidden ASP:Button with jQuery by
$("#<%=HiddenButton.ClientID%>").click();
or
$("#<%=HiddenButton.ClientID%>").trigger("click");
However, neither of these are working for me UNLESS the button is Visible=”true”
Here is the button:
<asp:Button ID="loadCustomerContacts" runat="server" OnClick="loadCustomerContacts_Click" visible="false" />"
If you set the
Visibleproperty to false; typically in .net the control will not be rendered in the HTML output after the page is processed. Therefore as far as jQuery is concerned, the button does not exist.You can do a View Source on the page to verify this.
If you want to do this, instead of using the
Visibleproperty, you can do something like:Or you can assign it a CSS class that hides it.