System.Web.UI.WebControls.WebControl.Height Property

Gets or sets the height of the Web server control.

Syntax

[System.ComponentModel.DefaultValue(typeof(System.Web.UI.WebControls.Unit), "")]
public virtual Unit Height { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the WebControl.Height property to specify the height of the Web server control.

Note:

This property does not render for all controls in browsers earlier than Microsoft Internet Explorer version 4. Controls that do not render this property in earlier browsers include System.Web.UI.WebControls.Label, System.Web.UI.WebControls.HyperLink, System.Web.UI.WebControls.LinkButton, and any validation controls. The System.Web.UI.WebControls.CheckBoxList, System.Web.UI.WebControls.RadioButtonList and System.Web.UI.WebControls.DataList also do not render this property in earlier browsers when their RepeatLayout property is set to RepeatLayout.Flow. Furthermore, only unit types of Pixel and Percentage are supported in earlier browsers.

Because this property is nonstandard HTML, Web server controls that display as a table, such as System.Web.UI.WebControls.Table and System.Web.UI.WebControls.DataGrid, do not support this property in browsers earlier than Microsoft Internet Explorer version 4.

Note:

To set the WebControl.Height property to a unit type other than the default of Pixel, you must create a new unit type specific to the unit type you want. For example, to set a control's WebControl.Height property to a percentage value of 100, you could do the following:

myWebControl.Width = Unit.Percentage(100);

For more information on the unit types available for the WebControl.Height property, see the System.Web.UI.WebControls.Unit class.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0