Change the BorderStyle property of the DropDownList control (ASP.NET)

Posted on 2004-04-17
Last Modified: 2012-05-04
Hi, I want to get rid of the sunken border on the dropdownlist control.

MSDN says:
The BorderStyle property is inherited from the WebControl class and is not applicable to the DropDownList control.

Can this be done by changing the WebControl class?
Question by:sumo_the_cat
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 28

Expert Comment

ID: 10848836
why don't you use
DropDownList.BorderStyle = BorderStyle.Outset
DropDownList.BorderStyle = BorderStyle.Ridge


Author Comment

ID: 10848966
? Doesn't do anything! Still getting the same sunken effect. I think it's as the documentation says: these properties are ignored for this control.
LVL 15

Expert Comment

ID: 10849654
Yes, you cannot change the actual style of the drop down list, only its colors.

Author Comment

ID: 10849781
But is it not possible to change these properties in the WebControl class?
LVL 15

Accepted Solution

Timbo87 earned 500 total points
ID: 10849840
Well what it comes down to is the web browser (IE, Mozilla, etc). They only support one type of border style and because the ASP.NET controls are just wrappers of the HTML controls with CSS, they cannot be changed.

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor ( Top Charts is a view in which you can set seve…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question