Re: hyperlink onmouseover
A hyperlink doesn't know what an image is (or any src property). But you can put an image 'inside' a hyperlink.
Code:
<asp:HyperLink NavigateUrl="~/Default.aspx" runat="server" ID="lnk">
<img id="ImageInHyperlink" src="Controls/marker_top.gif" alt="" />
</asp:HyperLink>
Then in your codebehind add:
Code:
lnk.Attributes.Add("OnMouseOver",
"document.getElementById('ImageInHyperlink').src='imageA.gif'");
lnk.Attributes.Add("OnMouseOut",
"document.getElementById('ImageInHyperlink').src='imageB.gif'");
- petter
Re: hyperlink onmouseover
thanks, it worked...
the only thing it didn't do was changing mouse behavior...
with ImageButtons it changes from arrow to hand...
and it didn't do it automatically...
i'll see what i can do...
Re: hyperlink onmouseover
my mistake
forget about the mouse cursor stuff...
i had removed the hyperlink's url, that's why i was not getting the hand cursor..
thanks