472,334 Members | 2,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,334 software developers and data experts.

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 13346
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ashoo | last post by:
Guys! I am trying to use a dropdownlist click event in my header page to link to my main page in a frameset type of form. I try to link to my...
2
by: Doug Stiers | last post by:
I have an asp:hyperlink that I need to have some code fire when the link is clicked. The link is in a datagrid and the link is working properly. I...
2
by: Big E | last post by:
I'm using ASP.Net and SQL Server. I have a table called states. I have 2 forms. On form 1 is the 50 states in textboxes created with a loop. I...
1
by: Daniel | last post by:
Hi All, Does anyone know to send click event to the hyperlink?? What i mean is the user click on the button and the hyperlink click event will...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these...
2
by: Keith Wilby | last post by:
A2003, XP Pro. I have a text box on a form. The text box is bound to a hyperlink field. I want to use the contents of the text box in code so...
0
by: lechatthierry | last post by:
Is it possible to block a mouse event on an Hyperlink with a general script event? This is quite troublesome for me. I am trying to find a way to...
1
by: Neko | last post by:
Is it possible to block a mouse event on an Hyperlink with a general script event? This is quite troublesome for me. I am trying to find a way to...
6
by: mramsay | last post by:
Hi, I am lost when it comes to creating a click event in asp. I have hyperlinks that are pulled dynamically from a table. An example is Hockey...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.