Forum Moderators: open

Message Too Old, No Replies

Linking with Image Button

change image and link with imagebutton

         

letsgetsilly

2:59 pm on May 25, 2006 (gmt 0)

10+ Year Member



Hello all,

I'm building a site where the header contains a menu with links for home/services/etc. The links are all images also. When the user clicks this link, I need it to change the picture and link to the corresponding page.

I was thinking an imagebutton would work well for this, but any suggestions are very welcome.

Thanks for your help! (additional info below:)

The change in picture for this link is supposed to create a seamless graphical link to the current page. For example, the main page background will be white, so the image that the link changes to is a white "tab" that looks like it is part of the main content.

mrMister

3:28 pm on May 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



change the picture and link

Can you clarify what you mean by this? Are you wanting to change the link href or do you actually mean the user will navigate to another page when the button is clicked?

Assuming you mean the former...

I'd use client side javascript for this. The inbuilt ASP.Net controls are horribly inefficent and don't work very well outside of Internet Explorer.

letsgetsilly

3:52 pm on May 25, 2006 (gmt 0)

10+ Year Member



when the user clicks on the href, the image of the href will change and the user will go to the link that is referenced. The link location will not change, sorry.

If you can picture a manilla folder tab...the website is designed to be multiple tabs like that, and when selected, that particular tab comes to the front. That is where the image change comes into play.

Our servers are heavily MS based and I'm using Visual Studio 05. My boss would like me to stay away from java script, but I suppose I could use some if necessary.

If there is any vb/asp code available that would be very helpful. If not, javascript. Thanks!

mrMister

1:51 am on May 27, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just use an image control, or a standard image htmlcontrol.