Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 734
  • Last Modified:

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

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
sumo_the_cat
Asked:
sumo_the_cat
  • 2
  • 2
1 Solution
 
mmarinovCommented:
why don't you use
DropDownList.BorderStyle = BorderStyle.Outset
or
DropDownList.BorderStyle = BorderStyle.Ridge

B..M
0
 
sumo_the_catAuthor Commented:
? 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
 
Timbo87Commented:
Yes, you cannot change the actual style of the drop down list, only its colors.
0
 
sumo_the_catAuthor Commented:
But is it not possible to change these properties in the WebControl class?
0
 
Timbo87Commented:
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

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now