Solved

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

Posted on 2012-04-07
7
732 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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