X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web%2FSystem.Web.UI.HtmlControls%2FHtmlTable.cs;h=7ae378a0bc9bbbac34e1c3f1b062638fa66b86fc;hb=58fdac7b8a191881c721c1e04592fc4a8b4b6ab1;hp=a01bcdf79879fd5faf03bf78aa4c00b62d5bf5c2;hpb=f8e85983264271dc224d87e0e1cfbd16f5f91241;p=mono.git diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlTable.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlTable.cs index a01bcdf7987..7ae378a0bc9 100644 --- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlTable.cs +++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlTable.cs @@ -4,7 +4,7 @@ // Author: // Sebastien Pouliot // -// 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 @@ -29,29 +29,24 @@ using System.ComponentModel; using System.Globalization; using System.Security.Permissions; +using System.Web.Util; -namespace System.Web.UI.HtmlControls { - +namespace System.Web.UI.HtmlControls +{ // CAS [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] // attributes -#if NET_2_0 - [ParseChildren (true, "Rows", ChildControlType = typeof(Control))] -#else - [ParseChildren (true, "Rows")] -#endif - public class HtmlTable : HtmlContainerControl { - - private HtmlTableRowCollection _rows; - + [ParseChildren (true, "Rows")] + public class HtmlTable : HtmlContainerControl + { + HtmlTableRowCollection _rows; public HtmlTable () : base ("table") { } - [DefaultValue ("")] [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] [WebSysDescription("")] @@ -99,7 +94,7 @@ namespace System.Web.UI.HtmlControls { if (value == -1) Attributes.Remove ("border"); else - Attributes ["border"] = value.ToString (CultureInfo.InvariantCulture); + Attributes ["border"] = value.ToString (Helpers.InvariantCulture); } } @@ -133,7 +128,7 @@ namespace System.Web.UI.HtmlControls { if (value == -1) Attributes.Remove ("cellpadding"); else - Attributes ["cellpadding"] = value.ToString (CultureInfo.InvariantCulture); + Attributes ["cellpadding"] = value.ToString (Helpers.InvariantCulture); } } @@ -150,7 +145,7 @@ namespace System.Web.UI.HtmlControls { if (value == -1) Attributes.Remove ("cellspacing"); else - Attributes ["cellspacing"] = value.ToString (CultureInfo.InvariantCulture); + Attributes ["cellspacing"] = value.ToString (Helpers.InvariantCulture); } } @@ -214,18 +209,13 @@ namespace System.Web.UI.HtmlControls { return new HtmlTableRowControlCollection (this); } -#if NET_2_0 - protected internal -#else - protected -#endif - override void RenderChildren (HtmlTextWriter writer) + protected internal override void RenderChildren (HtmlTextWriter writer) { - writer.WriteLine (); if (HasControls ()) { writer.Indent++; base.RenderChildren (writer); writer.Indent--; + writer.WriteLine (); } }