X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web%2FSystem.Web.UI.HtmlControls%2FHtmlMeta.cs;h=6cb40f441a68b3943025111a07903235c838abe2;hb=f9596050629ebf0d8d24fb256cc08f98d6d2c7e7;hp=703ea06d6f7502ac2c6fc052f375e68c11295959;hpb=736f8356c48895dfbf2d317a7fa39d1a9f4fad6b;p=mono.git diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlMeta.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlMeta.cs index 703ea06d6f7..6cb40f441a6 100644 --- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlMeta.cs +++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlMeta.cs @@ -4,7 +4,7 @@ // Authors: // Chris Toshok (toshok@ximian.com) // -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) +// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -26,12 +26,11 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 - using System.ComponentModel; using System.Collections; using System.Security.Permissions; using System.Web.UI.WebControls; +using System.Web.Configuration; namespace System.Web.UI.HtmlControls { @@ -48,7 +47,7 @@ namespace System.Web.UI.HtmlControls get { string s = Attributes["content"]; if (s == null) - return ""; + return String.Empty; return s; } set { @@ -65,7 +64,7 @@ namespace System.Web.UI.HtmlControls get { string s = Attributes["http-equiv"]; if (s == null) - return ""; + return String.Empty; return s; } set { @@ -76,14 +75,13 @@ namespace System.Web.UI.HtmlControls } } - [MonoTODO] [DefaultValue ("")] [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] public virtual string Name { get { string s = Attributes["name"]; if (s == null) - return ""; + return String.Empty; return s; } set { @@ -94,12 +92,13 @@ namespace System.Web.UI.HtmlControls } } - [MonoTODO] + [DefaultValue ("")] + [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] public virtual string Scheme { get { string s = Attributes["scheme"]; if (s == null) - return ""; + return String.Empty; return s; } set { @@ -109,7 +108,19 @@ namespace System.Web.UI.HtmlControls Attributes["scheme"] = value; } } + + protected internal override void Render (HtmlTextWriter writer) + { + XhtmlConformanceSection xhtml = WebConfigurationManager.GetSection ("system.web/xhtmlConformance") as XhtmlConformanceSection; + + if (xhtml != null && xhtml.Mode == XhtmlConformanceMode.Legacy) + base.Render (writer); + else { + writer.WriteBeginTag (TagName); + RenderAttributes (writer); + writer.Write ("/>"); + } + } } } -#endif