Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-04-07
7
Medium Priority
?
753 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 2000 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

963 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