How to get intercept an event on a HyperLink control ?

G

Gilles Lambert

Hi,

I need the NavigateUrl property of the HyperLink control to point to a
file and whish to intercept the click on the link. But this control
don't expose such event and the LinkButon don't expose the NavigateUrl
property.

So is it possible to do this ?

Thanks and best regards
Gilles
 
M

Matt Hawley

Hi Gilles,

What I would do in this situation, which in fact I kind of do in my public website is the following:

1. Use a LinkButton so you can intercept the click in code.
2. Pass the value of NavigateUrl in the CommandArgument that you can nab in the event handler in code.
3. In your code, process what you need to do for the intercept, then do a Respone.Redirect(LinkButton1.CommandArgument)

I hope this helps!

Matt Hawley, MCAD .NET http://www.eworldui.net Hi,

I need the NavigateUrl property of the HyperLink control to point to a
file and whish to intercept the click on the link. But this control
don't expose such event and the LinkButon don't expose the NavigateUrl
property.

So is it possible to do this ?

Thanks and best regards
Gilles
 

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,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top