Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / HtmlControls / HtmlTableRow.cs / 5 / HtmlTableRow.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.HtmlControls {
using System;
using System.Collections;
using System.ComponentModel;
using System.Globalization;
using System.Web;
using System.Web.UI;
using System.Security.Permissions;
///
///
/// The
/// class defines the properties, methods, and events for the HtmlTableRow control.
/// This class allows programmatic access on the server to individual HTML
/// <tr> elements enclosed within an control.
///
///
[
ParseChildren(true, "Cells")
]
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class HtmlTableRow : HtmlContainerControl {
HtmlTableCellCollection cells;
public HtmlTableRow() : base("tr") {
}
///
///
/// Gets or sets the horizontal alignment of the cells contained in an
/// control.
///
///
[
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);
}
}
/*
* Collection of child TableCells.
*/
///
///
/// Gets or sets the group of table cells contained within an
/// control.
///
///
[
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
]
public virtual HtmlTableCellCollection Cells {
get {
if (cells == null)
cells = new HtmlTableCellCollection(this);
return cells;
}
}
///
///
/// Gets or sets the background color of an
/// 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 border color 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 height of an control.
///
///
[
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);
}
}
///
/// [To be supplied.]
///
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));
}
}
///
///
/// Gets or sets the vertical alignment of of the cells contained in an
/// control.
///
///
[
WebCategory("Layout"),
DefaultValue(""),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public string VAlign {
get {
string s = Attributes["valign"];
return((s != null) ? s : String.Empty);
}
set {
Attributes["valign"] = MapStringAttributeToString(value);
}
}
///
///
///
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();
}
///
/// [To be supplied.]
///
protected override ControlCollection CreateControlCollection() {
return new HtmlTableCellControlCollection(this);
}
///
/// [To be supplied.]
///
protected class HtmlTableCellControlCollection : ControlCollection {
internal HtmlTableCellControlCollection (Control owner) : base(owner) {
}
///
/// Adds the specified object to the collection. The new control is added
/// to the end of the array.
///
public override void Add(Control child) {
if (child is HtmlTableCell)
base.Add(child);
else
throw new ArgumentException(SR.GetString(SR.Cannot_Have_Children_Of_Type, "HtmlTableRow", child.GetType().Name.ToString(CultureInfo.InvariantCulture))); // throw an exception here
}
///
/// Adds the specified object to the collection. The new control is added
/// to the array at the specified index location.
///
public override void AddAt(int index, Control child) {
if (child is HtmlTableCell)
base.AddAt(index, child);
else
throw new ArgumentException(SR.GetString(SR.Cannot_Have_Children_Of_Type, "HtmlTableRow", child.GetType().Name.ToString(CultureInfo.InvariantCulture))); // throw an exception here
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.HtmlControls {
using System;
using System.Collections;
using System.ComponentModel;
using System.Globalization;
using System.Web;
using System.Web.UI;
using System.Security.Permissions;
///
///
/// The
/// class defines the properties, methods, and events for the HtmlTableRow control.
/// This class allows programmatic access on the server to individual HTML
/// <tr> elements enclosed within an control.
///
///
[
ParseChildren(true, "Cells")
]
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class HtmlTableRow : HtmlContainerControl {
HtmlTableCellCollection cells;
public HtmlTableRow() : base("tr") {
}
///
///
/// Gets or sets the horizontal alignment of the cells contained in an
/// control.
///
///
[
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);
}
}
/*
* Collection of child TableCells.
*/
///
///
/// Gets or sets the group of table cells contained within an
/// control.
///
///
[
Browsable(false),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
]
public virtual HtmlTableCellCollection Cells {
get {
if (cells == null)
cells = new HtmlTableCellCollection(this);
return cells;
}
}
///
///
/// Gets or sets the background color of an
/// 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 border color 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 height of an control.
///
///
[
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);
}
}
///
/// [To be supplied.]
///
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));
}
}
///
///
/// Gets or sets the vertical alignment of of the cells contained in an
/// control.
///
///
[
WebCategory("Layout"),
DefaultValue(""),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public string VAlign {
get {
string s = Attributes["valign"];
return((s != null) ? s : String.Empty);
}
set {
Attributes["valign"] = MapStringAttributeToString(value);
}
}
///
///
///
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();
}
///
/// [To be supplied.]
///
protected override ControlCollection CreateControlCollection() {
return new HtmlTableCellControlCollection(this);
}
///
/// [To be supplied.]
///
protected class HtmlTableCellControlCollection : ControlCollection {
internal HtmlTableCellControlCollection (Control owner) : base(owner) {
}
///
/// Adds the specified object to the collection. The new control is added
/// to the end of the array.
///
public override void Add(Control child) {
if (child is HtmlTableCell)
base.Add(child);
else
throw new ArgumentException(SR.GetString(SR.Cannot_Have_Children_Of_Type, "HtmlTableRow", child.GetType().Name.ToString(CultureInfo.InvariantCulture))); // throw an exception here
}
///
/// Adds the specified object to the collection. The new control is added
/// to the array at the specified index location.
///
public override void AddAt(int index, Control child) {
if (child is HtmlTableCell)
base.AddAt(index, child);
else
throw new ArgumentException(SR.GetString(SR.Cannot_Have_Children_Of_Type, "HtmlTableRow", child.GetType().Name.ToString(CultureInfo.InvariantCulture))); // throw an exception here
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DetailsViewDeletedEventArgs.cs
- ImageDrawing.cs
- SiteMembershipCondition.cs
- LayoutExceptionEventArgs.cs
- DataTableNewRowEvent.cs
- QueryResults.cs
- UserControl.cs
- ClipboardProcessor.cs
- DictionaryBase.cs
- CatalogZoneBase.cs
- SqlConnectionManager.cs
- AnnotationStore.cs
- CodeChecksumPragma.cs
- TrueReadOnlyCollection.cs
- TypeSystem.cs
- Pointer.cs
- UIElementHelper.cs
- UpdateProgress.cs
- ValidationPropertyAttribute.cs
- TemplateBaseAction.cs
- WebPartAuthorizationEventArgs.cs
- TextRunProperties.cs
- SimpleBitVector32.cs
- NestedContainer.cs
- Pen.cs
- DataGridSortingEventArgs.cs
- PreservationFileReader.cs
- RequestCachePolicy.cs
- EffectiveValueEntry.cs
- AuthorizationRule.cs
- EntityModelBuildProvider.cs
- Point3DConverter.cs
- WindowsFormsSynchronizationContext.cs
- WindowsSpinner.cs
- CultureMapper.cs
- ACL.cs
- ReverseInheritProperty.cs
- LayoutTableCell.cs
- X509InitiatorCertificateClientElement.cs
- UserUseLicenseDictionaryLoader.cs
- FloaterParagraph.cs
- RootAction.cs
- ISAPIWorkerRequest.cs
- XmlSerializableServices.cs
- Dictionary.cs
- DetailsViewUpdateEventArgs.cs
- InputScope.cs
- EdmItemCollection.OcAssemblyCache.cs
- SecurityKeyType.cs
- X509CertificateClaimSet.cs
- WebBrowserProgressChangedEventHandler.cs
- ControlBuilder.cs
- _StreamFramer.cs
- XmlILIndex.cs
- SwitchAttribute.cs
- EpmCustomContentWriterNodeData.cs
- HGlobalSafeHandle.cs
- SafeMemoryMappedViewHandle.cs
- AbstractSvcMapFileLoader.cs
- TaskHelper.cs
- ToolStripItemTextRenderEventArgs.cs
- CalculatedColumn.cs
- XmlDataSourceNodeDescriptor.cs
- CodeTypeDelegate.cs
- UrlMappingCollection.cs
- PagesChangedEventArgs.cs
- CharacterBufferReference.cs
- UnionExpr.cs
- MeshGeometry3D.cs
- BlurBitmapEffect.cs
- log.cs
- PrtCap_Builder.cs
- WebPartAuthorizationEventArgs.cs
- CompositeFontParser.cs
- SmiEventSink_DeferedProcessing.cs
- QilLoop.cs
- ChangeBlockUndoRecord.cs
- _LocalDataStore.cs
- SendParametersContent.cs
- BitmapScalingModeValidation.cs
- ConfigurationManager.cs
- SerializerDescriptor.cs
- CatalogZoneBase.cs
- DataGridViewRowsAddedEventArgs.cs
- DPAPIProtectedConfigurationProvider.cs
- ScrollBarRenderer.cs
- WebServiceErrorEvent.cs
- DesignTimeVisibleAttribute.cs
- XmlBinaryReader.cs
- PassportAuthenticationModule.cs
- DependencyPropertyDescriptor.cs
- HtmlHead.cs
- LicenseProviderAttribute.cs
- DataGridViewRowCollection.cs
- GuidelineSet.cs
- DataContext.cs
- FontDriver.cs
- WmlPageAdapter.cs
- SQLDouble.cs
- ClusterUtils.cs