Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to NOT display "little hand" of mouse when image button is disabled?

Posted on 2004-08-25
3
Medium Priority
?
287 Views
Last Modified: 2011-10-03
I wouldn't want to display the "little hand" of the mouse when my image button is disabled. Does any one know how to do that?

MyImageButton.Enabled = False

Then how to not display the little hand of the mouse?
Thanks!
0
Comment
Question by:CrazyNet
[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
  • 2
3 Comments
 
LVL 3

Expert Comment

by:alexpreston
ID: 11900227
Try   MyImageButton.style = "cursor: default"
0
 
LVL 3

Expert Comment

by:alexpreston
ID: 11900240
ooh, .NET.

Try this instead   MyImageButton.Attributes.Add("style", "cursor:default")
0
 
LVL 8

Accepted Solution

by:
shovavnik earned 600 total points
ID: 11900536
Don't use the second one, as you'll overwrite the existing style information.

Instead use the special style property:

MyImageButton.Style.Add("cursor", "default")

But the best way is to not do this in the codebehind.  Rather, it's much better to manage style informationon the client.  
Use one of the following methods:
1. Add it to the style attribute of the control.
2. Add a css class for images either in a linked css file or in a <styles> element on your page:
img {
  cursor: default;
}

The reason to do this on the client side, is that it makes it much easier to maintain.  You want to avoid needing to recompile your code just to change style information.  CodeBehind isn't good for *everything*.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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 …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
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…
Suggested Courses

722 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