Link Button

Last post 10-06-2008 5:44 PM by vinz. 3 replies.

Sort Posts:

  • Link Button

    10-06-2008, 2:10 PM
    • Member
      424 point Member
    • bendJoe
    • Member since 08-31-2007, 4:31 PM
    • Posts 465

     I am setting the enable property of a link button to false. I also need to make the text to be grey. How can the text be greyed.

    Thanks

  • Re: Link Button

    10-06-2008, 2:21 PM
    • Star
      8,432 point Star
    • cv_vikram
    • Member since 07-04-2006, 1:33 PM
    • Earth
    • Posts 1,047

    Friend, you need to make something like this to make it grey

    http://veskokolev.blogspot.com/2007/07/aspnet-linkbutton-when-disabled-renders.html

    Good luck!

    Please Don't forget to click "Mark as Answer" on the post that helped you.
    This can be beneficial to other community members reading the thread.
  • Re: Link Button

    10-06-2008, 5:29 PM
    • Member
      230 point Member
    • gyclone
    • Member since 07-10-2008, 1:31 AM
    • Posts 87

     vb code behind:

    LinkButton1.ForeColor = Drawing.Color.Gray

    or

    asp front end:

    <asp:LinkButton ID="LinkButton1" ForeColor="Gray" runat="server">LinkButton</asp:LinkButton>

    Gyclone

    Using Visual Studio 2008 Standard, VB code behind, ASP.net 2.0, .Net 3.5
  • Re: Link Button

    10-06-2008, 5:44 PM
    Answer
    • All-Star
      91,768 point All-Star
    • vinz
    • Member since 10-05-2007, 11:47 AM
    • Cebu, Philippines
    • Posts 13,769
    • TrustedFriends-MVPs

    bendJoe:

     I am setting the enable property of a link button to false. I also need to make the text to be grey. How can the text be greyed.

    You can set the fontcolor of the LinkButton after you disable it like below:

     

    LinkButton1.Enabled = false;
    LinkButton1.Attributes.Add("style", "COLOR:gray");
      
    "Code,Beer and Music ~ my way of being a programmer"

Page 1 of 1 (4 items)