Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / HtmlControls / HtmlTableCell.cs / 1 / HtmlTableCell.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
/*
* HtmlTableCell.cs
*
* Copyright (c) 2000 Microsoft Corporation
*/
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 HtmlTableCell control.
/// This class allows programmatic access on the server to individual HTML
/// <td> and <th> elements enclosed within an
///
/// control.
///
///
[ConstructorNeedsTag(true)]
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class HtmlTableCell : HtmlContainerControl {
///
///
public HtmlTableCell() : base("td") {
}
///
///
public HtmlTableCell(string tagName) : base(tagName) {
}
///
///
/// Gets or sets the horizontal alignment of content within 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);
}
}
///
///
/// 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);
}
}
/*
* Number of columns that this cell spans.
*/
///
///
/// Gets or sets the number of columns that the HtmlTableCell control spans.
///
///
[
WebCategory("Layout"),
DefaultValue(""),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public int ColSpan {
get {
string s = Attributes["colspan"];
return((s != null) ? Int32.Parse(s, CultureInfo.InvariantCulture) : -1);
}
set {
Attributes["colspan"] = MapIntegerAttributeToString(value);
}
}
///
///
/// Gets or sets the height, in pixels, 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);
}
}
/*
* Suppresses wrapping.
*/
///
///
/// Gets or sets a value indicating whether text within an
/// control
/// should be wrapped.
///
///
[
WebCategory("Behavior"),
DefaultValue(""),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden),
TypeConverter(typeof(MinimizableAttributeTypeConverter))
]
public bool NoWrap {
get {
string s = Attributes["nowrap"];
return((s != null) ? (s.Equals("nowrap")) : false);
}
set {
if (value)
Attributes["nowrap"] = "nowrap";
else
Attributes["nowrap"] = null;
}
}
/*
* Number of rows that this cell spans.
*/
///
///
/// Gets or sets the number of rows an control
/// spans.
///
///
[
WebCategory("Layout"),
DefaultValue(""),
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)
]
public int RowSpan {
get {
string s = Attributes["rowspan"];
return((s != null) ? Int32.Parse(s, CultureInfo.InvariantCulture) : -1);
}
set {
Attributes["rowspan"] = MapIntegerAttributeToString(value);
}
}
///
///
/// Gets or sets the vertical alignment for text within 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);
}
}
///
///
/// Gets or sets the width, in pixels, 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);
}
}
///
///
///
protected override void RenderEndTag(HtmlTextWriter writer) {
base.RenderEndTag(writer);
writer.WriteLine();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TypedRowGenerator.cs
- OLEDB_Enum.cs
- ToolBarTray.cs
- ItemContainerGenerator.cs
- WebPartVerb.cs
- FieldAccessException.cs
- ToolStripCodeDomSerializer.cs
- AttributeQuery.cs
- XmlCharacterData.cs
- MailMessageEventArgs.cs
- PeerApplicationLaunchInfo.cs
- DataProtection.cs
- PersonalizationProviderHelper.cs
- XmlLoader.cs
- PersistenceTypeAttribute.cs
- DocumentXPathNavigator.cs
- SqlDataSourceCommandEventArgs.cs
- WaitHandleCannotBeOpenedException.cs
- DPTypeDescriptorContext.cs
- PolyBezierSegment.cs
- SQLCharsStorage.cs
- ComplexType.cs
- BaseConfigurationRecord.cs
- ContextMenuStrip.cs
- OpenTypeLayout.cs
- ObjectListItem.cs
- DbConnectionPoolGroup.cs
- FaultReason.cs
- XXXInfos.cs
- ActivationServices.cs
- XamlPoint3DCollectionSerializer.cs
- DesignerActionItemCollection.cs
- XmlnsDictionary.cs
- TargetParameterCountException.cs
- IList.cs
- WindowsProgressbar.cs
- ScriptModule.cs
- EtwProvider.cs
- SchemaElementLookUpTable.cs
- ArrangedElement.cs
- ListenerElementsCollection.cs
- SystemIcons.cs
- FixedSOMImage.cs
- SafeWaitHandle.cs
- ComboBoxAutomationPeer.cs
- ToolboxItemSnapLineBehavior.cs
- RegexWriter.cs
- InheritanceContextHelper.cs
- GeneralTransform2DTo3DTo2D.cs
- SelectionRangeConverter.cs
- MsmqIntegrationSecurity.cs
- TCPClient.cs
- BooleanToVisibilityConverter.cs
- StringExpressionSet.cs
- LocalBuilder.cs
- BezierSegment.cs
- WebPartTransformerAttribute.cs
- DataGridBoolColumn.cs
- BinaryObjectReader.cs
- SiteMembershipCondition.cs
- ObjectViewListener.cs
- URLString.cs
- AddressAlreadyInUseException.cs
- LinqExpressionNormalizer.cs
- FormsAuthenticationUser.cs
- ReadContentAsBinaryHelper.cs
- ObsoleteAttribute.cs
- WorkflowMarkupSerializationManager.cs
- UrlPath.cs
- ProfileEventArgs.cs
- AlphabeticalEnumConverter.cs
- ValueCollectionParameterReader.cs
- pingexception.cs
- Int32Storage.cs
- OdbcConnectionString.cs
- HttpMethodConstraint.cs
- FileNotFoundException.cs
- _HTTPDateParse.cs
- DataListItemEventArgs.cs
- ProfilePropertySettings.cs
- Automation.cs
- PeerCollaboration.cs
- TextRangeEdit.cs
- Typeface.cs
- SendMailErrorEventArgs.cs
- InvalidPropValue.cs
- FontInfo.cs
- XmlILTrace.cs
- CapabilitiesRule.cs
- PartManifestEntry.cs
- ResourcesBuildProvider.cs
- ConfigurationManagerInternalFactory.cs
- LinqDataSourceInsertEventArgs.cs
- ComplexObject.cs
- XmlEncoding.cs
- ThemeInfoAttribute.cs
- MethodImplAttribute.cs
- KeyMatchBuilder.cs
- RequestCacheValidator.cs
- IdentityNotMappedException.cs