pitaridis Well-known member Joined Nov 18, 2005 Messages 63 Programming Experience 10+ Aug 28, 2006 #1 I have a WebControl on a form and I want to execute some kind of code when the user clicks on a link. Does anyone knows how to do it?
I have a WebControl on a form and I want to execute some kind of code when the user clicks on a link. Does anyone knows how to do it?
JohnH VB.NET Forum Moderator Staff member Joined Dec 17, 2005 Messages 15,858 Location Norway Programming Experience 10+ Aug 28, 2006 #2 See this for attaching event handler for links click event, you have to do it for all links in collection, but can use the same event handler method for each. http://www.vbdotnetforums.com/showthread.php?t=11287&highlight=webbrowser You could also figure out something with the Navigating or Navigated events, but it is difficult because they fire several times each page. Upvote 0 Downvote
See this for attaching event handler for links click event, you have to do it for all links in collection, but can use the same event handler method for each. http://www.vbdotnetforums.com/showthread.php?t=11287&highlight=webbrowser You could also figure out something with the Navigating or Navigated events, but it is difficult because they fire several times each page.