using System.Globalization;
using System.Security.Permissions;
using System.Text;
+using System.Web.Util;
namespace System.Web.UI.WebControls {
[DefaultProperty ("Text")]
[ParseChildren (false)]
[ToolboxItem ("")]
-#if NET_2_0
[Bindable (false)]
[Designer ("System.Web.UI.Design.WebControls.PreviewControlDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
-#else
- [PersistChildren (true)]
-#endif
public class TableCell : WebControl {
public TableCell ()
}
-#if NET_2_0
[DefaultValue (null)]
[TypeConverter (typeof (StringArrayConverter))]
public virtual string[] AssociatedHeaderCellID {
ViewState ["AssociatedHeaderCellID"] = value;
}
}
-#endif
-#if ONLY_1_1
- [Bindable (true)]
-#endif
[DefaultValue (0)]
[WebSysDescription ("")]
[WebCategory ("Appearance")]
}
}
-#if ONLY_1_1
- [Bindable (true)]
-#endif
[DefaultValue (HorizontalAlign.NotSet)]
[WebSysDescription ("")]
[WebCategory ("Layout")]
set { TableItemStyle.HorizontalAlign = value; }
}
-#if ONLY_1_1
- [Bindable (true)]
-#endif
[DefaultValue (0)]
[WebSysDescription ("")]
[WebCategory ("Layout")]
}
}
-#if NET_2_0
[Localizable (true)]
[PersistenceMode (PersistenceMode.InnerDefaultProperty)]
-#else
- [Bindable (true)]
-#endif
[DefaultValue ("")]
[WebSysDescription ("")]
[WebCategory ("Appearance")]
}
}
-#if ONLY_1_1
- [Bindable (true)]
-#endif
[DefaultValue (VerticalAlign.NotSet)]
[WebSysDescription ("")]
[WebCategory ("Layout")]
set { TableItemStyle.VerticalAlign = value; }
}
-#if ONLY_1_1
- [Bindable (true)]
-#endif
[DefaultValue (true)]
[WebSysDescription ("")]
[WebCategory ("Layout")]
}
set { TableItemStyle.Wrap = value; }
}
-
- private TableItemStyle TableItemStyle {
+ public override bool SupportsDisabledAttribute {
+ get { return RenderingCompatibilityLessThan40; }
+ }
+ TableItemStyle TableItemStyle {
get { return (ControlStyle as TableItemStyle); }
}
-
protected override void AddAttributesToRender (HtmlTextWriter writer)
{
base.AddAttributesToRender (writer);
int i = ColumnSpan;
if (i > 0)
- writer.AddAttribute (HtmlTextWriterAttribute.Colspan, i.ToString (CultureInfo.InvariantCulture));
+ writer.AddAttribute (HtmlTextWriterAttribute.Colspan, i.ToString (Helpers.InvariantCulture), false);
i = RowSpan;
if (i > 0)
- writer.AddAttribute (HtmlTextWriterAttribute.Rowspan, i.ToString (CultureInfo.InvariantCulture));
-#if NET_2_0
+ writer.AddAttribute (HtmlTextWriterAttribute.Rowspan, i.ToString (Helpers.InvariantCulture), false);
string[] ahci = AssociatedHeaderCellID;
if (ahci.Length > 1) {
StringBuilder sb = new StringBuilder ();
// most common case (without a StringBuilder)
writer.AddAttribute (HtmlTextWriterAttribute.Headers, ahci [0]);
}
-#endif
}
protected override void AddParsedSubObject (object obj)
return new TableItemStyle (ViewState);
}
-#if NET_2_0
protected internal
-#else
- protected
-#endif
override void RenderContents (HtmlTextWriter writer)
{
- if (HasControls ())
+ if (HasControls () || HasRenderMethodDelegate ())
base.RenderContents (writer);
else
writer.Write (Text);