Change Color of LinkButton

Discussion in 'ASP .Net Datagrid Control' started by Robert E. Flaherty, Jul 19, 2005.

  1. How does one go about changing the foreground color of a linkbutton like
    "Select"?
    Robert E. Flaherty, Jul 19, 2005
    #1
    1. Advertising

  2. Robert E. Flaherty

    Mona Guest

    Hi Robert,

    You can change the foreground color of a linkbutton by embedding style tags
    inside the Head portion of the HTML . For more information on this, I would
    request you to please go through the following site :
    http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/a.asp

    Hope this helps.

    Regards,
    Mona [Grapecity]

    "Robert E. Flaherty" <> wrote in message
    news:%...
    > How does one go about changing the foreground color of a linkbutton like
    > "Select"?
    >
    >
    Mona, Jul 19, 2005
    #2
    1. Advertising

  3. I don't have a clue as to how to embed style tags inside the Head portion
    nor did reviewing the suggested site help.

    What I have is the following inside the definition of a datagrid:
    ,asp:ButtonColumn Text="Email" CommandName="Select" ></asp:ButtonColumn>. I
    would like the "Email" end up in blue and underlined like
    .

    "Mona" <> wrote in message
    news:%...
    > Hi Robert,
    >
    > You can change the foreground color of a linkbutton by embedding style
    > tags
    > inside the Head portion of the HTML . For more information on this, I
    > would
    > request you to please go through the following site :
    > http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/a.asp
    >
    > Hope this helps.
    >
    > Regards,
    > Mona [Grapecity]
    >
    > "Robert E. Flaherty" <> wrote in message
    > news:%...
    >> How does one go about changing the foreground color of a linkbutton like
    >> "Select"?
    >>
    >>

    >
    >
    Robert E. Flaherty, Jul 20, 2005
    #3
  4. Robert E. Flaherty

    Elton Wang Guest

    Hi Robert,

    There are two options you can use to change foreground of linkbutton:

    1) In page's HTML Design View, to set the linkbutton's ItemStyle-ForeColor
    property.

    2) Or in datagrid_ItemDataBound event, use code to change linkbutton's
    foreground:

    LinkButton selectBtn = (LinkButton)e.Item.Cells[select_index].Controls[0];
    selectBtn.ForeColor = Color.Red;

    HTH

    Elton Wang

    "Robert E. Flaherty" <> wrote in message
    news:%...
    > How does one go about changing the foreground color of a linkbutton like
    > "Select"?
    >
    >
    Elton Wang, Jul 20, 2005
    #4
  5. Robert E. Flaherty

    Elton Wang Guest

    Hi Robert,

    There are two options you can use to change foreground of linkbutton:

    1) In page's HTML Design View, to set the linkbutton's ItemStyle-ForeColor
    property.

    2) Or in datagrid_ItemDataBound event, use code to change linkbutton's
    foreground:

    LinkButton selectBtn = (LinkButton)e.Item.Cells[select_index].Controls[0];
    selectBtn.ForeColor = Color.Red;

    HTH

    Elton Wang

    "Robert E. Flaherty" <> wrote in message
    news:%...
    > How does one go about changing the foreground color of a linkbutton like
    > "Select"?
    >
    >
    Elton Wang, Jul 20, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sathyaish
    Replies:
    3
    Views:
    3,079
    Sathyaish
    Sep 8, 2005
  2. Matt Adams
    Replies:
    0
    Views:
    871
    Matt Adams
    Aug 26, 2003
  3. Sathyaish

    Linkbutton does not look like a linkbutton

    Sathyaish, Sep 8, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    170
    Sathyaish
    Sep 8, 2005
  4. Kamaljeet Saini
    Replies:
    0
    Views:
    377
    Kamaljeet Saini
    Feb 13, 2009
  5. Replies:
    7
    Views:
    362
    Mick White
    Feb 2, 2005
Loading...

Share This Page