Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / HtmlControls / HtmlTableCell.cs / 1305376 / 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)]
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HyperLinkField.cs
- NaturalLanguageHyphenator.cs
- typedescriptorpermission.cs
- MediaPlayer.cs
- SqlClientPermission.cs
- Types.cs
- GridToolTip.cs
- FrameworkElementFactoryMarkupObject.cs
- XmlAttributeOverrides.cs
- DataGridViewTextBoxColumn.cs
- DSASignatureFormatter.cs
- LiteralTextParser.cs
- HostedTransportConfigurationBase.cs
- Mutex.cs
- GroupBoxAutomationPeer.cs
- AssemblyHelper.cs
- WindowsGrip.cs
- HwndSource.cs
- WorkflowTimerService.cs
- ToolBarTray.cs
- CodeAssignStatement.cs
- UnsafeNetInfoNativeMethods.cs
- UrlMappingsSection.cs
- VirtualizingStackPanel.cs
- ObjectKeyFrameCollection.cs
- DBCSCodePageEncoding.cs
- HttpListenerException.cs
- Menu.cs
- EdmPropertyAttribute.cs
- ScrollBar.cs
- RawAppCommandInputReport.cs
- SqlFactory.cs
- ListControlDesigner.cs
- ConstructorNeedsTagAttribute.cs
- CodeDefaultValueExpression.cs
- NavigationPropertySingletonExpression.cs
- TableItemProviderWrapper.cs
- Stroke.cs
- XmlException.cs
- RouteItem.cs
- BitmapFrameEncode.cs
- ItemList.cs
- UrlMappingsSection.cs
- IIS7WorkerRequest.cs
- DataGridViewBand.cs
- SqlDataSourceWizardForm.cs
- BufferBuilder.cs
- hresults.cs
- ExtentCqlBlock.cs
- EventSinkHelperWriter.cs
- AbstractExpressions.cs
- HexParser.cs
- UidManager.cs
- TrackBar.cs
- Crc32.cs
- EnumMemberAttribute.cs
- ComponentEvent.cs
- CodeAccessPermission.cs
- XmlTextEncoder.cs
- SvcMapFileSerializer.cs
- RequestResponse.cs
- TimeEnumHelper.cs
- TypeSystem.cs
- DiscoveryInnerClientAdhoc11.cs
- DataControlImageButton.cs
- BlurBitmapEffect.cs
- HttpApplicationStateWrapper.cs
- CopyCodeAction.cs
- Italic.cs
- DebugTracing.cs
- CngKeyBlobFormat.cs
- MsmqActivation.cs
- DataGridTableCollection.cs
- SoapObjectWriter.cs
- HttpChannelHelpers.cs
- AssemblyCache.cs
- ListCollectionView.cs
- MinimizableAttributeTypeConverter.cs
- BufferedResponseStream.cs
- _SslSessionsCache.cs
- EntityConnection.cs
- Logging.cs
- SymmetricKeyWrap.cs
- ConsumerConnectionPoint.cs
- SafeLocalAllocation.cs
- BrowserDefinition.cs
- StickyNoteContentControl.cs
- XmlEncoding.cs
- CompiledQuery.cs
- MouseGesture.cs
- RootBrowserWindow.cs
- HttpDebugHandler.cs
- CodeTypeOfExpression.cs
- BindingManagerDataErrorEventArgs.cs
- TextDecorationCollectionConverter.cs
- DataGridColumnFloatingHeader.cs
- ProtocolsConfigurationHandler.cs
- OpenTypeLayoutCache.cs
- StyleModeStack.cs
- SourceElementsCollection.cs