Click here to Skip to main content
15,886,004 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am generating
HTML
<a href="...">
dynamically in a code behind. When I click on the link it needs to run a sub from the code behind and also I need to know which link actually triggered that code behind function/sub.

This is my code behind:

HTML
     <a href='#'
          id='" + i.MemberId.ToString() + "'
        Text='Click Me'
onServerClick='Check_Clicked'
        runat="server">Click Me
    </a>


And this is what I need to call:

VB
Sub Check_Clicked(sender As Object, e As EventArgs)
    Me.div_result.InnerHtml = "TEST"
End Sub
Posted
Updated 18-Feb-14 8:33am
v4
Comments
Sergey Alexandrovich Kryukov 18-Feb-14 18:24pm    
Could you load the page with the link in browser, to look at the rendered HTML on client site? You can do it using browser's "View Page source" (or something similar). It can give you a clue. You can show relevant fragment of this HTML...
—SA

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