Solved

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

Posted on 2004-04-17
5
689 Views
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?
0
Comment
Question by:sumo_the_cat
[X]
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
5 Comments
 
LVL 28

Expert Comment

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

B..M
0
 
LVL 2

Author Comment

by:sumo_the_cat
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.
0
 
LVL 15

Expert Comment

by:Timbo87
ID: 10849654
Yes, you cannot change the actual style of the drop down list, only its colors.
0
 
LVL 2

Author Comment

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

Accepted Solution

by:
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.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 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