Hi,
Is there a way to force .NET to add styles to controls to display
properties as set in the VS.NET designer? I'm using Visual Studio.NET
2002, and therefore 1.0 .NET framework.
For example, I've created a page that has a textbox control with its
width set in the VS.NET designer. When the page is displayed in IE6 it
has the style added to the input field to display it how I wanted:
<input name="LeftMenu:txtMiniAge" type="text" maxlength="3"
id="LeftMenu_txtMiniAge" style="width:34px;" />
However when I view the same page in the latest Mozilla the styles
aren't added and I get:
<input name="LeftMenu:txtMiniAge" type="text" maxlength="3"
id="LeftMenu_txtMiniAge" />
In fact I'm not getting styles added to any controls in Mozilla unless I
explicitly set them in the code behind file, eg:
txtMiniAge.Style.Add("width", "34px")
Its much easier to set the properties in the designer and I'd rather not
have to add code to set them twice. If I only set them in the code
behind then the designer view doesn't look right.
Any ideas?
Tony