473,799 Members | 2,868 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Class HyperLink and mouseover

I am making a link with the HyperLink-class like this:

HyperLink link = new HyperLink();
link.NavigateUr l = "http://www.page.com";
link.Text = "Some text";
link.ImageUrl="/images/linkimage.gif";

What I would like to do is to show another image for the link on the
mouseover event.

Is this possible?

/Peter
Nov 19 '05 #1
1 1130
you'll have to add an .Attributes = ".....yourmouse oversutff...";
--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Peter Eriksson" <pe************ ****@telia.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I am making a link with the HyperLink-class like this:

HyperLink link = new HyperLink();
link.NavigateUr l = "http://www.page.com";
link.Text = "Some text";
link.ImageUrl="/images/linkimage.gif";

What I would like to do is to show another image for the link on the
mouseover event.

Is this possible?

/Peter

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6032
by: addi | last post by:
All, I have seen the feature on many sites and would like to implement it for myself as well, where if a mouse is moved over a hyperlink, it gets underlined. For example, in my code, if the mouse is moved over "home" or gets the focus, I would like it to be underlined. <html> <body> <font face="Arial, Helvetica, sans-serif" size="1" color="#999999">
2
2627
by: Peter Eriksson | last post by:
I am making a link with the HyperLink-class like this: HyperLink link = new HyperLink(); link.NavigateUrl = "http://www.page.com"; link.Text = "Some text"; link.ImageUrl="/images/linkimage.gif"; What I would like to do is to show another image for the link on the mouseover event.
2
1811
by: wazoo | last post by:
I'm hoping someone here might help me with this. I'm putting the finishing touches on my intranet web app, and I'm adding some simple JavaScript to my VB.Net Webforms. This works: Button1.Attributes.Add("onmouseover", "this.style.backgroundColor=""Blue""") Button1.Attributes.Add("onmouseout", "this.style.backgroundColor=""Navy""") And this works:
1
1655
by: vishal | last post by:
I am using a datagrid where there is a hyperlink column. On mouseover I get the whole link in the status bar which I want to put some static message or mask it. How do I achive this in .net? If any one knows the script or any other method just let me know that with some sample code. regards vishal.
1
2061
by: mjryan | last post by:
Any idea why this code would not fire? btnMakePmt.Attributes.Add("onMouseOver", "this.src='img\\MakePmt_nav2_over.jpg'") btnMakePmt.Attributes.Add("onMouseOut", "this.src='img\\MakePmt_nav2.jpg'") I have two other Image buttons that this code works fine with. The btnMakePmt is an asp.net hyperlink control. I need this to remain a hyperlink so I can use the Target attribute to display it in a new window instead of the current browser...
8
3800
by: Nathan Sokalski | last post by:
I have several System.Web.UI.WebControls.HyperLink Controls which I want to display as rollover images. I know how to make these manually using the <a> and <img> tags or the <a> tag and a System.Web.UI.WebControls.Image Control or a HyperLink and Image Controls, but the onMouseOver and onMouseOut attributes must be in the <img> tag. If I were to use the HyperLink's ImageUrl property and add the attributes using the...
0
1201
by: Whitney Yiu | last post by:
I am using a DataGrid, and have bound it to some data (not using the quick design way though -- i hard coded it using sql data adapter, command, etc). Anyways, I have a column that is a link, and i want it to link to a javascript function that i've declared in the same page, but in the markup. I set the field type as Hyperlink, and this is how i set it up: NavigateUrl: Javascript:showActivityDetails() DataNavigateUrlField: ActivityID...
1
1550
by: Peter Morris | last post by:
Newbie q. how do I change the image url for a hyperlink on mouseover? I have a menubar, and I want to highlight the selected item.
5
5531
by: Dave | last post by:
I've been given a flash banner and told to make it a hyperlink. I tried this: <script type="text/javascript"> Document.getElementById("flashcontent").onclick = function(){ window.location='http://www.website.com'; } </script> but received an error stating that "Document" was undefined. I also tried this:
4
8150
by: Mat | last post by:
How do you modify the color of an hyperlink when your mouse go over it? <asp:HyperLink
0
9689
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10269
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10248
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4148
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2942
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.