Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / HtmlControls / HtmlTable.cs / 4 / HtmlTable.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.HtmlControls { using System; using System.Reflection; using System.Collections; using System.ComponentModel; using System.Globalization; using System.Web; using System.Web.UI; using System.Security.Permissions; ////// [ ParseChildren(true, "Rows") ] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] public class HtmlTable : HtmlContainerControl { HtmlTableRowCollection rows; ///Defines the properties, methods, and events for the /// ////// control that allows programmatic access on the /// server to the HTML <table> element. /// Initializes a new instance of the public HtmlTable() : base("table") { } ///class. /// /// [ WebCategory("Layout"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string Align { get { string s = Attributes["align"]; return((s != null) ? s : String.Empty); } set { Attributes["align"] = MapStringAttributeToString(value); } } ///Gets or sets the alignment of content within the ////// control. /// [ WebCategory("Appearance"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string BgColor { get { string s = Attributes["bgcolor"]; return((s != null) ? s : String.Empty); } set { Attributes["bgcolor"] = MapStringAttributeToString(value); } } ///Gets or sets the background color of an ////// control. /// [ WebCategory("Appearance"), DefaultValue(-1), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public int Border { get { string s = Attributes["border"]; return((s != null) ? Int32.Parse(s, CultureInfo.InvariantCulture) : -1); } set { Attributes["border"] = MapIntegerAttributeToString(value); } } ///Gets or sets the width of the border, in pixels, of an /// ///control. /// [ WebCategory("Appearance"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string BorderColor { get { string s = Attributes["bordercolor"]; return((s != null) ? s : String.Empty); } set { Attributes["bordercolor"] = MapStringAttributeToString(value); } } ///Gets or sets the border color of an ///control. /// [ WebCategory("Appearance"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public int CellPadding { get { string s = Attributes["cellpadding"]; return((s != null) ? Int32.Parse(s, CultureInfo.InvariantCulture) : -1); } set { Attributes["cellpadding"] = MapIntegerAttributeToString(value); } } ////// Gets or sets the cell padding, in pixels, for an ///control. /// /// [ WebCategory("Appearance"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public int CellSpacing { get { string s = Attributes["cellspacing"]; return((s != null) ? Int32.Parse(s, CultureInfo.InvariantCulture) : -1); } set { Attributes["cellspacing"] = MapIntegerAttributeToString(value); } } ////// Gets or sets the cell spacing, in pixels, for an ///control. /// /// public override string InnerHtml { get { throw new NotSupportedException(SR.GetString(SR.InnerHtml_not_supported, this.GetType().Name)); } set { throw new NotSupportedException(SR.GetString(SR.InnerHtml_not_supported, this.GetType().Name)); } } ///[To be supplied.] ////// public override string InnerText { get { throw new NotSupportedException(SR.GetString(SR.InnerText_not_supported, this.GetType().Name)); } set { throw new NotSupportedException(SR.GetString(SR.InnerText_not_supported, this.GetType().Name)); } } ///[To be supplied.] ////// [ WebCategory("Layout"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string Height { get { string s = Attributes["height"]; return((s != null) ? s : String.Empty); } set { Attributes["height"] = MapStringAttributeToString(value); } } ////// Gets or sets the height of an ////// control. /// /// [ WebCategory("Layout"), DefaultValue(""), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden) ] public string Width { get { string s = Attributes["width"]; return((s != null) ? s : String.Empty); } set { Attributes["width"] = MapStringAttributeToString(value); } } ////// Gets or sets the width of an ///control. /// /// [ Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), IgnoreUnknownContent() ] public virtual HtmlTableRowCollection Rows { get { if (rows == null) rows = new HtmlTableRowCollection(this); return rows; } } ////// Gets a collection that contains all of the rows in an /// ///control. An empty collection is returned if no /// <tr> elements are contained within the control. /// /// /// protected internal override void RenderChildren(HtmlTextWriter writer) { writer.WriteLine(); writer.Indent++; base.RenderChildren(writer); writer.Indent--; } ////// /// protected override void RenderEndTag(HtmlTextWriter writer) { base.RenderEndTag(writer); writer.WriteLine(); } ////// protected override ControlCollection CreateControlCollection() { return new HtmlTableRowControlCollection(this); } ///[To be supplied.] ////// protected class HtmlTableRowControlCollection : ControlCollection { internal HtmlTableRowControlCollection (Control owner) : base(owner) { } ///[To be supplied.] ////// public override void Add(Control child) { if (child is HtmlTableRow) base.Add(child); else throw new ArgumentException(SR.GetString(SR.Cannot_Have_Children_Of_Type, "HtmlTable", child.GetType().Name.ToString(CultureInfo.InvariantCulture))); // throw an exception here } ///Adds the specified ///object to the collection. The new control is added /// to the end of the array. /// public override void AddAt(int index, Control child) { if (child is HtmlTableRow) base.AddAt(index, child); else throw new ArgumentException(SR.GetString(SR.Cannot_Have_Children_Of_Type, "HtmlTable", child.GetType().Name.ToString(CultureInfo.InvariantCulture))); // throw an exception here } } // class HtmlTableRowControlCollection } }Adds the specified ///object to the collection. The new control is added /// to the array at the specified index location.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AccessedThroughPropertyAttribute.cs
- ClickablePoint.cs
- BinaryObjectInfo.cs
- CheckBox.cs
- ReferencedAssemblyResolver.cs
- DirectoryObjectSecurity.cs
- FixedSOMPage.cs
- PatternMatcher.cs
- StateMachineExecutionState.cs
- WebHeaderCollection.cs
- ObjectTag.cs
- BuildResultCache.cs
- SizeAnimation.cs
- RelationshipConstraintValidator.cs
- ToolTipAutomationPeer.cs
- BaseAppDomainProtocolHandler.cs
- CircleHotSpot.cs
- CmsUtils.cs
- TaskbarItemInfo.cs
- SafeReadContext.cs
- DescendantOverDescendantQuery.cs
- UnmanagedMarshal.cs
- StyleHelper.cs
- RawStylusInputCustomDataList.cs
- TCPClient.cs
- EpmCustomContentSerializer.cs
- DataServiceContext.cs
- BaseTemplateCodeDomTreeGenerator.cs
- XmlBaseReader.cs
- StyleTypedPropertyAttribute.cs
- MatrixConverter.cs
- SimplePropertyEntry.cs
- CharacterMetricsDictionary.cs
- SiteMapNodeItem.cs
- FileVersion.cs
- storepermission.cs
- SQLInt64Storage.cs
- BooleanExpr.cs
- EntityDesignerBuildProvider.cs
- DynamicDiscoSearcher.cs
- Point3DKeyFrameCollection.cs
- ImageKeyConverter.cs
- DesignerObjectListAdapter.cs
- CodeTypeDelegate.cs
- XPathMultyIterator.cs
- MultiPropertyDescriptorGridEntry.cs
- BindingSource.cs
- ImpersonationContext.cs
- UnsafeNativeMethods.cs
- Polygon.cs
- DataGridViewCellCancelEventArgs.cs
- CodeDirectiveCollection.cs
- EnumCodeDomSerializer.cs
- Image.cs
- WindowsAuthenticationModule.cs
- IfJoinedCondition.cs
- SqlCachedBuffer.cs
- Point3D.cs
- FloaterBaseParagraph.cs
- ToolStripDropDownMenu.cs
- TranslateTransform3D.cs
- Sql8ConformanceChecker.cs
- DataRowCollection.cs
- IsolatedStoragePermission.cs
- OrderedDictionary.cs
- EdgeModeValidation.cs
- WebPartCancelEventArgs.cs
- PageContentCollection.cs
- MimeTypePropertyAttribute.cs
- ColumnReorderedEventArgs.cs
- FilteredDataSetHelper.cs
- querybuilder.cs
- HttpWebRequestElement.cs
- CounterSet.cs
- FontUnitConverter.cs
- SymLanguageVendor.cs
- TextCompositionManager.cs
- SettingsAttributes.cs
- DiscoveryOperationContext.cs
- CommandEventArgs.cs
- XmlNullResolver.cs
- XmlSchemaAttribute.cs
- XmlAnyAttributeAttribute.cs
- GenericWebPart.cs
- WinFormsUtils.cs
- Overlapped.cs
- HttpPostedFile.cs
- DataSet.cs
- RequestCacheManager.cs
- CodeMethodReturnStatement.cs
- HttpCachePolicy.cs
- IisTraceWebEventProvider.cs
- _NestedSingleAsyncResult.cs
- DataGridViewIntLinkedList.cs
- StructuredTypeEmitter.cs
- BitmapPalette.cs
- SharedHttpsTransportManager.cs
- XPathNodeList.cs
- XPathExpr.cs
- Configuration.cs