Declarative syntax for different borders in server controls
am 02.04.2008 07:41:28 von Nathan SokalskiIn many databound controls (DataList, Menu, etc.), there are controls that
are used to specify the style for certain scenarios (for example, the
DataList has ItemStyle). Several of the properties of these controls, such
as BorderWidth, BorderColor, and BorderStyle, only allow you to specify one
value, but CSS, which is where the values from these properties are used,
allows up to four (top, bottom, left, and right). Therefore, there is no way
to declaratively assign different values to the four sides without creating
a CSS class. Is there a way around this? Is it something that is changed in
3.5 (I am still using 2.0)? I realize that in general CSS classes are better
than generating a style attribute, but I still think that server controls
that offer these properties should offer a way to specify different values
for all four sides.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/