how to call postback link of another element in jQuery on some other event?

Posted by Amit on Stack Overflow See other posts from Stack Overflow or by Amit
Published on 2010-04-16T09:30:15Z Indexed on 2010/04/16 9:33 UTC
Read the original article Hit count: 230

Filed under:
|

Hi This is kind of peculiar requirement..

I am using asp.net and jQuery together

I have a link button as follows

<asp:LinkButton ID="displayBtn" runat="server" OnClick="displayBtn_Click" Text="Display 
Content"></asp:LinkButton>

I will hide this link button using

style="dipsly:none;" 

and want to call the postback called by click of the asp link button using some other html element say a div.

<div id="invokeTest"> Click here </div>

I tried using

$('#invokeTest').click(function(){
  $('#<%=displayBtn.ClientID%>').click();
});

Any idea how could this be done?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about ASP.NET