[AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
// attributes
+ [ParseChildren (true)]
#if NET_2_0
[PersistChildrenAttribute (false, false)]
- [ParseChildrenAttribute (true, ChildControlType = typeof(Control))]
[Themeable (true)]
#else
[PersistChildrenAttribute (false)]
- [ParseChildrenAttribute (true)]
#endif
public class WebControl : Control, IAttributeAccessor {
Style style;
public virtual new bool EnableTheming
{
get { return base.EnableTheming; }
- set { EnableTheming = value; }
+ set { base.EnableTheming = value; }
}
#endif
if (TabIndex != 0)
writer.AddAttribute (HtmlTextWriterAttribute.Tabindex, TabIndex.ToString ());
- if (style != null && !style.IsEmpty)
+ if (style != null && !style.IsEmpty) {
+#if NET_2_0
+ //unbelievable, but see WebControlTest.RenderBeginTag_BorderWidth_xxx
+ if (TagKey == HtmlTextWriterTag.Span)
+ if (style.BorderWidth != Unit.Empty
+ || style.BorderStyle != BorderStyle.NotSet)
+ writer.AddStyleAttribute (HtmlTextWriterStyle.Display, "inline-block");
+#endif
style.AddAttributesToRender(writer, this);
+ }
if (attributes != null)
foreach(string s in attributes.Keys)