Solved

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

Posted on 2012-04-07
7
724 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
  • 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now