Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Controls / October 2006

Tip: Looking for answers? Try searching our database.

visibly disable img link

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Thielen - 30 Oct 2006 06:43 GMT
Hi;

We have image links via ButtonField and when it is disabled, the link does
not work but the image looks the same. Any suggestions to make the image look
disabled?

Signature

thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Steven Cheng[MSFT] - 30 Oct 2006 13:45 GMT
Hi Dave,

As for the ImageButton it is rendered as <input type="image"  src="...."  
/>, when you set its "Enabled=false", it is rendered as

<input type="image" disabled="disabled" .../>

And the image will still display as normal, it is only the postback/submit
behavior that will be disabled.  If you want to make the button also
display the image like a disabled one(masked), you need to change the
imagebutton's url to another image (has the picture look as disabled one).

e.g.

if(imageButton.Enabled == false)
{
  imageButton.Src = "disabled image url";
}

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



This posting is provided "AS IS" with no warranties, and confers no rights.
David Thielen - 30 Oct 2006 17:24 GMT
Hi;

That's what I thought - but figured I should ask in case ASP had some better
solution.

Signature

thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm

> Hi Dave,
>
[quoted text clipped - 24 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 31 Oct 2006 04:03 GMT
Thanks for your reply Dave,

So far ASP.NET server control also provide the same disable behavior as
HTML element.

Please feel free to let me know if you have any other questions or ideas on
this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.