Solved

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

Posted on 2004-04-17
5
667 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
Comment Utility
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
Comment Utility
? 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
Comment Utility
Yes, you cannot change the actual style of the drop down list, only its colors.
0
 
LVL 2

Author Comment

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

Accepted Solution

by:
Timbo87 earned 500 total points
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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.   …
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.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

9 Experts available now in Live!

Get 1:1 Help Now