ASP .NET Bug?

  • Thread starter Thread starter Frank Vazquez
  • Start date Start date
F

Frank Vazquez

Does anybody know how to control the width of the
DropDownList to match the width of the table cell when
using the directive "ClientTarget=downlevel". The
DropDownList fills the table cell width without the
directive. When I add the directive to the asp.net page
the DropDownList controls change size and don't fill the
table cell width. I already have an explicit width set
on the DropDownList.

Any help is greatly appreciated.

Thanks
 
Remember that ASP.NET web form controls must ultimately render themselves as
HTML in the client. If you are setting the ClientTarget to downlevel, then
all you have left is the standard behavior of an HTML drop down list, which
sets its width based on the widest text in the list.

If you didn't have ClientTarget set to downlevel, you could simply adjust
the style property of the control and use the CSS size/width property, but
you've stated that this is not an option for you.

It may sound cheesy, but given that you must render this control according
to basic HTML rules, you could embed some extra spaces in the text of a drop
down item.
 
Back
Top