I know how to trigger a button click via jquery. :
$('#hiddenSendButton').trigger('click');
What I was trying to do is have this trigger a click event in the codebehind.
<input id="hiddenSendButton" class="hiddenSendButton" type="hidden" runat="server" onclick="btnSend_Click" />
I don’t think that I am doing this correctly, I am guessing that I need to use an asp.net button control in order to tie it to the codebehind, or something of that nature.
Here is my codebehind. :
Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As EventArgs)
I tried added in a handles clause but due to it being an input button it didn’t have that.
Any ideas? I am sure it is simple I just can’t seem to find anything on this through my searching.
One of the things that I was thinking was using an asp.net button but how do I make that hidden but still visible on the clientside.
Yes you will need to use an asp.net button control to tie it to the click event in the code-behind.
Also, in your example you have it as a hidden field, not a hidden button. These are two very different things. Hidden fields don’t have the ability to be “clicked”.