Solved

ASP.net Change image on mouse over of item in dropdownbox vb.net

Posted on 2012-04-07
7
742 Views
Last Modified: 2012-04-30
Hi I have a dropdown box and a image in a update panel. I have it set so when a user selects and item in the drop down box it changes the picture. (this is done by using  AddHandler SelectedIndexChanged event).                  

I want to make this more user friendly, and have it so as they use the mouse over each item change the image then. In other words so they dont have to select the item first.
0
Comment
Question by:taz8020
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
7 Comments
 
LVL 17

Accepted Solution

by:
selvol earned 500 total points
ID: 37818945
<style type="text/css">
    .pointer
    {
        cursor:pointer;
    }
    </style>
</head>
<body>
 <asp:DropDownList CssClass="pointer"  ID="DropDownList1" runat="server">
        <asp:ListItem>
        item1
        </asp:ListItem>
        <asp:ListItem>
        item2
        </asp:ListItem>
        <asp:ListItem>
        item3
        </asp:ListItem>
        </asp:DropDownList>

Selvol
0
 
LVL 3

Author Comment

by:taz8020
ID: 37819134
Hi thanks but dont see how that would help. It is a databound dropdown showing productsref.
when the user hovers over an item I want to show the product image in the imagebox on the right of the dropdown. I have done this at the moment when the user selectsthe item by using the SelectedIndexChanged event. Just want to make more user friendly.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37819695
See if you can use the technique shown here to show image instead of text

http://weblogs.asp.net/abdullaabdelhaq/archive/2009/06/07/adding-tooltip-for-each-list-item.aspx
0
Stressed Out?

Watch some penguins on the livecam!

 
LVL 3

Author Comment

by:taz8020
ID: 37819981
Hi Codecruiser, your link looks like it might work. If i could on the mouse over call a function and pass it a the productID which is in the dropdown list.  Any ideas how I would do this?
0
 
LVL 3

Author Comment

by:taz8020
ID: 37833516
Hi Codecruiser, link works on the combobox mouseover but not for each item in the combobox. any ideas?
0
 
LVL 3

Author Comment

by:taz8020
ID: 37839413
Hi Codecruiser, the tooltip works fine but I want it to change an image on the mouse over event of the dropdownbox ITEM.
I used your code and in the title put the image url, this works if you move the mouse over the dropdown box but not on each item within the dropdownlist.

You can see this sort of working if you go to http://www.thepromotionalcompany.co.uk/Products/10LBALLOON.aspx
0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

688 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