// 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
// 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
{
get {
string s = Attributes["content"];
if (s == null)
- return "";
+ return String.Empty;
return s;
}
set {
get {
string s = Attributes["http-equiv"];
if (s == null)
- return "";
+ return String.Empty;
return s;
}
set {
get {
string s = Attributes["name"];
if (s == null)
- return "";
+ return String.Empty;
return s;
}
set {
get {
string s = Attributes["scheme"];
if (s == null)
- return "";
+ return String.Empty;
return s;
}
set {
protected internal override void Render (HtmlTextWriter writer)
{
- writer.WriteBeginTag (TagName);
- RenderAttributes (writer);
- writer.Write (">");
+ 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