[System.Web.*] Reference source import: System.Web.Profile.(ProfileInfoCollection...
[mono.git] / mcs / class / System.Web / System.Web.UI.HtmlControls / HtmlTitle.cs
index 889a57b43521b453b51f5dee01b3115c252e6475..a26215484cd3c1c0a33e2a8937b5b295bf26fbb6 100644 (file)
@@ -4,7 +4,7 @@
 // Authors:
 //     Lluis Sanchez Gual (lluis@novell.com)
 //
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-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,8 +26,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.ComponentModel;
 using System.Security.Permissions;
 
@@ -43,13 +41,15 @@ namespace System.Web.UI.HtmlControls
                protected override void AddParsedSubObject(object obj)
                {
                        LiteralControl lit = obj as LiteralControl;
-                       if (lit != null) text = lit.Text;
+                       if (lit != null)
+                               text = lit.Text;
+                       else
+                               base.AddParsedSubObject (obj);
                }
 
-               /* Appears in corcompare */
                protected override ControlCollection CreateControlCollection ()
                {
-                       return (base.CreateControlCollection ());
+                       return new ControlCollection (this);
                }
                
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
@@ -64,10 +64,12 @@ namespace System.Web.UI.HtmlControls
                protected internal override void Render (HtmlTextWriter writer)
                {
                        writer.RenderBeginTag (HtmlTextWriterTag.Title);
-                       writer.Write (text);
+                       if (HasControls () || HasRenderMethodDelegate ())
+                               RenderChildren (writer);
+                       else
+                               writer.Write (text);
                        writer.RenderEndTag ();
                }
        }
 }
 
-#endif