Goofy Drop Down List

U

Uriah Piddle

Hi Gang,

In VS 2005, I can't get an ASP DropDownList to take a BorderStyle property.
I've tried both with a skin id and inline. No matter what style I apply, it
comes up with the default style. I specified 'Dotted' and nothing dotted
happens. In Firefox, its the same except the border is very heavy black
instead of indented and does not change when I apply a different style.

Thanks.

Steve
 
U

Uriah Piddle

Thanks Jon,

I put this in the Page_Load block and the BackColor prop was changed but the
BorderStyle prop remains in the default setting. No matter what I put here,
the BorderStyle remains the same.

foreach (Control ctl in this.Controls)
{
if (ctl is DropDownList)
{
DropDownList cb = null;
cb = ctl as DropDownList;
cb.BackColor = System.Drawing.Color.FromName("Blue");
cb.BorderStyle = (BorderStyle)Enum.Parse(typeof(BorderStyle),"Dotted");
}
}

Thanks for any further ideas.

Steve
 
U

Uriah Piddle

I did some more googling on this one and, from what I read, the BorderStyle
prop can't be changed on this control (contrary to MS docs). One site
recommeded using just the straight HTML control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top