Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
<pre lang="HTML"><pre lang="HTML">


  • <asp:LinkButton ID="linkMenuProfile" runat="server"
    onclick="linkMenuProfile_Click">Profile
  • </ul>
Posted
Updated 10-Aug-14 18:46pm
v2
Comments
pradiprenushe 9-Aug-14 8:19am    
what about onclientclick property of linkbutton?
Jaimin H. Soni 9-Aug-14 8:43am    
onclientclick call the javascript function getId

1 solution

add onclientclick event in linkbutton like
VB
<asp:LinkButton ID="linkMenuProfile" runat="server" onclientclick = "getId(this);"
onclick="linkMenuProfile_Click">

JavaScript
function getId(_this)
{
   alert($(_this).attr('id'));
}

try this jquery for click event fire....
JavaScript
$('#<%=linkMenuProfile.ClientID%>').click();
 
Share this answer
 
Comments
m-shraddha 10-Aug-14 0:48am    
There are multiple LinkButtons in my <ul> tag. So I want to find out ID of any of the linkbutton on a single click... i cant write function for every LinkButton...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900