Solved

hyperlink.attributes.add onmouseover

Posted on 2006-07-12
3
926 Views
Last Modified: 2008-01-09
Hello experts,

I ahve two hyperlink controls, what is the syntax to assign the image of hypSmall to hypLarge,

I have got this far, but am stumped....

 HyperLink1.Attributes.Add("onMouseOut",...)
0
Comment
Question by:claracruz
3 Comments
 
LVL 9

Expert Comment

by:valkyrie_nc
ID: 17094785
... "src='" + hypSmall.ImageUrl.ToString() + '");



hth

valkyrie_nc
0
 
LVL 27

Accepted Solution

by:
Sammy earned 250 total points
ID: 17094961
You can use Css as well
<style type="text/css">
    .On{
   
    background-image:url(../Images/On.gif);
    }
.Off
{
background-image:url(../Images/Off.gif);
}
    </style>

and your page load
add this
HyperLink1.Attributes.Add("onmouseover", "this.className='On'")

HyperLink1.Attributes.Add("onmouseout", "this.className='Off'")
HyperLink1.Attributes.Add("onfocus", "this.blur();") 'Removes the flicker from IE

HTH
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question