Calendar::CellPadding Property

 

Gets or sets the amount of space between the contents of a cell and the cell's border.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
property int CellPadding {
	int get();
	void set(int value);
}

Property Value

Type: System::Int32

The amount of space (in pixels) between the contents of a cell and the cell's border. The default value is 2.

Exception Condition
ArgumentOutOfRangeException

The specified cell padding is less than -1.

Use this property to control the spacing between the contents of a cell and the cell's border. The padding amount specified is added to all four sides of a cell. Individual cell sizes cannot be specified.

System_CAPS_noteNote

Setting this property to -1 indicates that this property is not set in the rendered table.

The following code example demonstrates how to use the CellPadding property to pad each cell with 5 pixels.

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

.NET Framework
Available since 1.1
Return to top
Show: