Login
Register
Close
Articles
Technology News
All Articles
Submit Guest Post
Tools & Utilities
Code Converter
Forum
Learn
Tutorials
Interview Experience
Practice Tests
Freelancers
Services
Software Development
SEO & Digital Marketing
IT Companies
Login
Register
Articles
Technology News
All Articles
Submit Guest Post
Tools & Utilities
Code Converter
Forum
Learn
Tutorials
Interview Experience
Practice Tests
Freelancers
Services
Software Development
SEO & Digital Marketing
IT Companies
Discussion Forums
.NET
.NET
You must
Sign In
to post a response.
Category:
.NET
12 Apr 2019 14:35
Urmila
Joined:
15/05/2008
Level:
Silver
Points:
214
Points:
2
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.
<html>
<head>
</head>
<body>
<a href="" onclick="CallingMethod(); return false;">Click </a>
</body>
</html>
#769862
15 Apr 2019 14:41
Nirav Lalan
Joined:
06/04/2012
Level:
Gold
Points:
4230
Points:
3
Hi Urmila,
You can refer below code.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<a title="" runat="server" onserverclick="Anchor_Click" target="_blank" href="https://www.google.com">Click Me!</a>
</div>
</form>
</body>
</html>
protected void Anchor_Click(object sender, EventArgs e)
{
Response.Write("You clicked on hyperlink.");
}
Regards,
Nirav Lalan
DNS Gold Member
"If you can dream it, you can do it."
Delete Attachment
Sign In
to post your comments
Submit New Thread
Return to
Return to Discussion Forum
Top Contributors
Today
Last 7 Days
Ankit
(50)
more...