BackColor attribute in HyperLink doesn't work in Firefox

Discussion in 'ASP .Net' started by =?Utf-8?B?U3RldmUgRm9yZA==?=, Oct 7, 2005.

  1. I have a datagrid that contains the following template column:

    <ItemTemplate>
    <asp:HyperLink ID="partyColour" Runat="server" BackColor='<%#
    System.Drawing.Color.FromName(DataBinder.Eval(Container.DataItem,
    "PartyColour").ToString()) %>' NavigateUrl='<%# Request.ApplicationPath +
    "/Party.aspx?partyID=" + DataBinder.Eval(Container.DataItem,
    "Party").ToString() %>'>
    <asp:Image Runat="server" ImageUrl="../images/Pixel.gif" Height="20"
    Width="20" BorderWidth="1" BorderColor="#000000" />
    </asp:HyperLink>
    </ItemTemplate>

    This is intended to display a 20 x 20 pixel block of colour (as specified by
    the PartyColour column in the bound dataset) . It works fine in IE but
    neither the colour nor the border appear when viewed using Mozilla Firefox.
    When comparing the IE and Firefox page source side by side, the FF source
    contains no style information at all for this column. Any ideas how to
    resolve this problem?

    Many thanks in advance.
     
    =?Utf-8?B?U3RldmUgRm9yZA==?=, Oct 7, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?U3RldmUgRm9yZA==?=

    Bruce Barker Guest

    you need an update browsercaps file for aps.net to output style command for
    any browser other then IE. google this newgroup for browsercap to find an
    update.

    -- bruce (sqlwork.com)

    "Steve Ford" <Steve > wrote in message
    news:...
    >I have a datagrid that contains the following template column:
    >
    > <ItemTemplate>
    > <asp:HyperLink ID="partyColour" Runat="server" BackColor='<%#
    > System.Drawing.Color.FromName(DataBinder.Eval(Container.DataItem,
    > "PartyColour").ToString()) %>' NavigateUrl='<%# Request.ApplicationPath +
    > "/Party.aspx?partyID=" + DataBinder.Eval(Container.DataItem,
    > "Party").ToString() %>'>
    > <asp:Image Runat="server" ImageUrl="../images/Pixel.gif"
    > Height="20"
    > Width="20" BorderWidth="1" BorderColor="#000000" />
    > </asp:HyperLink>
    > </ItemTemplate>
    >
    > This is intended to display a 20 x 20 pixel block of colour (as specified
    > by
    > the PartyColour column in the bound dataset) . It works fine in IE but
    > neither the colour nor the border appear when viewed using Mozilla
    > Firefox.
    > When comparing the IE and Firefox page source side by side, the FF source
    > contains no style information at all for this column. Any ideas how to
    > resolve this problem?
    >
    > Many thanks in advance.
     
    Bruce Barker, Oct 7, 2005
    #2
    1. Advertising

  3. Thanks Bruce, that's exactly what I was loking for.
     
    =?Utf-8?B?U3RldmUgRm9yZA==?=, Oct 10, 2005
    #3
    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. tshad
    Replies:
    3
    Views:
    515
    MWells
    Jan 26, 2005
  2. jobs
    Replies:
    1
    Views:
    2,375
  3. Dmitry Duginov

    BackColor binding does not work on postback

    Dmitry Duginov, Sep 28, 2007, in forum: ASP .Net
    Replies:
    7
    Views:
    671
    Steven Cheng[MSFT]
    Oct 10, 2007
  4. Replies:
    1
    Views:
    881
    Alessandro Zifiglio
    Jul 20, 2006
  5. Replies:
    1
    Views:
    137
    David Dorward
    Aug 9, 2006
Loading...

Share This Page