Solved

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

Posted on 2004-04-17
5
669 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
help with issues with ReportViewer in VS2015 5 37
Unable  to create new object 9 38
ADO.NET ENTITY DATA MODEL 3 30
SQL Exceptions 3 35
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…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

943 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now