HtmlTableCell.Width Property

Gets or sets the width (in pixels) of the cell represented by an instance of the HtmlTableCell class.

Namespace: System.Web.UI.HtmlControls
Assembly: System.Web (in system.web.dll)

public:
property String^ Width {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_Width ()

/** @property */
public void set_Width (String value)

public function get Width () : String

public function set Width (value : String)

Not applicable.

Property Value

The width (in pixels) of the cell represented by an instance of HtmlTableCell. The default value is String.Empty, which indicates that this property is not set.

Use the Width property to specify the width (in pixels) of the cell represented by an instance of the HtmlTableCell class. When you specify the width for a cell, all cells in the same column automatically share that width.

NoteNote:

If you specify a width that is smaller than is required to display the contents of the cell, this property is ignored.

The following code example demonstrates how to use the Width property to programmatically control the width of the cells in the HtmlTable control.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: