use ResolveClientUrl instead of ResolveUrl to be complient with MS.NET
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / WebControl.cs
index 10e8ce47630691eeea1c677a2351469f1fbbf318..cd1332cdc564bffed4d1f707302230b8a049b347 100644 (file)
@@ -34,13 +34,12 @@ namespace System.Web.UI.WebControls {
        [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;
@@ -250,7 +249,7 @@ namespace System.Web.UI.WebControls {
                public virtual new bool EnableTheming
                {
                        get { return base.EnableTheming; }
-                       set { EnableTheming = value; }
+                       set { base.EnableTheming = value; }
                }
 #endif         
 
@@ -491,8 +490,16 @@ namespace System.Web.UI.WebControls {
                        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)