hyperlink click event?

G

Guest

Does anyone know how to trigger the click event of a
hyperlink control programmatically?

Thanks for helping.
 
C

Chris Jackson

A hyperlink doesn't generate a server-side click event - a hyperlink is a
client-side event. What you would need to do is create a JavaScript that
navigates to the page that you want - and you can use the DOM to navigate to
the <a> element and grab the href that you want for a window.navigate or
window.open.
 
G

Guest

can I use VB.Net instead.
-----Original Message-----
A hyperlink doesn't generate a server-side click event - a hyperlink is a
client-side event. What you would need to do is create a JavaScript that
navigates to the page that you want - and you can use the DOM to navigate to
the <a> element and grab the href that you want for a window.navigate or
window.open.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Shell/UI
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--




.
 
A

Anthony Williams

If you want to do that, you'll be wanting to use a LinkButton control, not a
Hyperlink control.

Regards,
Anthony
 
C

Chris Jackson

You can use VBScript, if all of your clients will be using Internet
Explorer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top