You must Sign In to post a response.
  • Category: .NET

    How to call html hyperlink click method in c# .net

    Hi All,

    Below CallingMethod() need to define in c#. is it possible?
    not in javascipt.




    <a href="" onclick="CallingMethod(); return false;">Click </a>

  • #769862
    Hi Urmila,

    You can refer below code.

    <html xmlns="">
    <head runat="server">
    <form id="form1" runat="server">
    <a title="" runat="server" onserverclick="Anchor_Click" target="_blank" href="">Click Me!</a>

    protected void Anchor_Click(object sender, EventArgs e)
    Response.Write("You clicked on hyperlink.");

    Nirav Lalan
    DNS Gold Member
    "If you can dream it, you can do it."

    Delete Attachment

  • Sign In to post your comments