469,929 Members | 1,388 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,929 developers. It's quick & easy.

hyperlink click event?


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

Thanks for helping.
Nov 18 '05 #1
4 13198
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)
--

<an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...

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

Thanks for helping.

Nov 18 '05 #2
can I use VB.Net instead.
-----Original Message-----
A hyperlink doesn't generate a server-side click event - a hyperlink is aclient-side event. What you would need to do is create a JavaScript thatnavigates to the page that you want - and you can use the DOM to navigate tothe <a> element and grab the href that you want for a window.navigate orwindow.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)
--

<an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...

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

Thanks for helping.

.

Nov 18 '05 #3
If you want to do that, you'll be wanting to use a LinkButton control, not a
Hyperlink control.

Regards,
Anthony

<an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
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)
--

<an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...

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

Thanks for helping.

.

Nov 18 '05 #4
You can use VBScript, if all of your clients will be using Internet
Explorer.

--
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)
--

<an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
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)
--

<an*******@discussions.microsoft.com> wrote in message
news:06****************************@phx.gbl...

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

Thanks for helping.

.

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by ashoo | last post: by
2 posts views Thread by Doug Stiers | last post: by
2 posts views Thread by Big E | last post: by
1 post views Thread by Daniel | last post: by
19 posts views Thread by Joe | last post: by
2 posts views Thread by Keith Wilby | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.