B
BobLaughland
Hi There,
I need a control on my site that is a hyperlink style control, but it
must,
1) Have a property that can hold where the hyperlink is pointing to.
(e.g. like the NavigateUrl property in the asp:hyperlink control).
2) Also can call my own method when the user clicks on the link (e.g.
like the Click event in the asp:linkbutton control).
Anyway it seems that the 2 controls separately do what I want, but
don't both do everything I want.
I will explain why. Basically what I have is a page which shows the
results from the user doing a search. It lists the results from the
search as hyperlinks (kind of like doing a search in google but local
to our site). When the user clicks on one of the links I would like it
to call a piece of my code to log which link they clicked for
statistical purposes. Also note that it has to know the page that it
is linking to (the asp:linkbutton does not have a NavigateUrl property
so this does not work).
Failing that the only other way I can think of doing it would be to
subclass one of the above controls and add the functionality, but that
sounds messy to me.
I need a control on my site that is a hyperlink style control, but it
must,
1) Have a property that can hold where the hyperlink is pointing to.
(e.g. like the NavigateUrl property in the asp:hyperlink control).
2) Also can call my own method when the user clicks on the link (e.g.
like the Click event in the asp:linkbutton control).
Anyway it seems that the 2 controls separately do what I want, but
don't both do everything I want.
I will explain why. Basically what I have is a page which shows the
results from the user doing a search. It lists the results from the
search as hyperlinks (kind of like doing a search in google but local
to our site). When the user clicks on one of the links I would like it
to call a piece of my code to log which link they clicked for
statistical purposes. Also note that it has to know the page that it
is linking to (the asp:linkbutton does not have a NavigateUrl property
so this does not work).
Failing that the only other way I can think of doing it would be to
subclass one of the above controls and add the functionality, but that
sounds messy to me.