Specifying the background colour of an <asp:TextBox> also changes its border style

Discussion in 'ASP .Net' started by Mark Rae, Jan 13, 2007.

  1. Mark Rae

    Mark Rae Guest

    Hi,

    Have been modifying a piece of JavaScript I found on the net which
    completely prevents the Google AutoFill Toolbar from doing its stuff... Got
    that working now but, while I was debugging it, I noticed that every field
    that the Google Toolbar turned yellow also had its border style changed...

    Seems that this is a standard "feature"... If you specify an <asp:TextBox>'s
    BackColor property, that also changes its border style - has anyone else
    seen this? It's the same if you make the change with DHTML after the page
    has loaded.

    E.g., when I display the following markup:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >

    <head runat="server">

    <title>Untitled Page</title>

    </head>

    <body>

    <form id="form1" runat="server">

    <asp:TextBox ID="txtWhite" runat="server" />

    <br />

    <asp:TextBox ID="txtGreen" runat="server" BackColor="LightGreen" />

    </form>

    </body>

    </html>


    the first textbox displays "normally" but the second has a different border
    style. Can anyone else confirm this behaviour and, if so, is there a way to
    prevent it...?

    Any assistance gratefully received.

    Mark
     
    Mark Rae, Jan 13, 2007
    #1
    1. Advertisements

  2. Mark Rae

    Mark Rae Guest

    Nobody got any ideas on this one...?
     
    Mark Rae, Jan 17, 2007
    #2
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.