Can't figure out how change DropDownList bordercolor

Discussion in 'ASP .Net Web Controls' started by Mike D, Jul 17, 2007.

  1. Mike D

    Mike D Guest

    I have tried for a couple of days to figure how to change the bordercolor of
    a DropDownList to match the background color of the page but to no avail. I
    have read and re-read the MSDN on it but I get either 'Could not load file or
    assembly' or 'Unknown server tag' depending on whether I use the Assembly
    parameter in the Register tag. I put the code in my master.cs using my app's
    namespace so it could be used through out my web app. Does any one know how
    to set it up or could spend a little time helping me figure it out? Thanks.

    --
    Regards,

    Mike D
    Coding in C# since Feb 2007
     
    Mike D, Jul 17, 2007
    #1
    1. Advertising

  2. Mike D

    Mike D Guest

    Thanks for the reply but the problem is that I changed the background color
    of the list to match the background of the <td> but now the DropDownList has
    a white border around the list and down arrow that I can't change to match
    the list and <td> background color. I think the only fix is to leave the
    list background white.
    Thanks again.
    --
    Regards,

    Mike D
    Coding in C# since Feb 2007


    "David R. Longnecker" wrote:

    > There isn't a Border property on a DropDownList, at least in 2.0. The way
    > around this is to surround it with a DIV and place a border on the DIV.
    > Here's a quick example that creates a 10px solid blue border around the DDL.
    > Be sure that your object's width matches the DIV so that they line up. :)
    >
    > <div style="border: solid 10px blue; width:200px;">
    > <asp:DropDownList ID="DropDownList1" runat="server" Width="200px" />
    > </div>
    >
    > HTH.
    >
    > -dl
    >
    > --
    > David R. Longnecker
    > http://blog.tiredstudent.com
    >
    > > I have tried for a couple of days to figure how to change the
    > > bordercolor of a DropDownList to match the background color of the
    > > page but to no avail. I have read and re-read the MSDN on it but I
    > > get either 'Could not load file or assembly' or 'Unknown server tag'
    > > depending on whether I use the Assembly parameter in the Register tag.
    > > I put the code in my master.cs using my app's namespace so it could be
    > > used through out my web app. Does any one know how to set it up or
    > > could spend a little time helping me figure it out? Thanks.
    > >
    > > Mike D
    > > Coding in C# since Feb 2007

    >
    >
    >
     
    Mike D, Jul 18, 2007
    #2
    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. Eirik Eldorsen

    mouseover changing bordercolor

    Eirik Eldorsen, Jul 8, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    4,194
    Ken Cox [Microsoft MVP]
    Jul 8, 2004
  2. Replies:
    3
    Views:
    1,842
  3. Albert Hopkins
    Replies:
    3
    Views:
    491
    Steven D'Aprano
    Dec 10, 2008
  4. Jay
    Replies:
    0
    Views:
    181
  5. Erik

    DropDownList skin - assign BorderColor

    Erik, Jul 27, 2006, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    1,210
    Alessandro Zifiglio
    Jul 28, 2006
Loading...

Share This Page