System.Web.UI.WebControls Namespace Style Class
Sets or retrieves the height of a Web control.
Inline |
<asp:control Height = intHeight [ % ]... > |
Script |
Style.Height [ = intHeight ] |
A Unit object that represents the height of the control.
NOTE: Only unit types of pixel and percentage will work.
intHeight |
Integer specifying height, in pixels. |
intHeight% |
Value expressed as a percentage of the parent object's height. |
This property is read/write with no default value.
Exception Type |
Condition |
ArgumentException |
The given height of the Web control was set to a negative value. |
This property specifies the calculated height of the object, in pixels. For table rows and cells, this property has a range of 0 to 32750 pixels.
Percentage values are based on the height of the parent object. If the value of the corresponding HTML attribute was set using a percentage, this property specifies the height in pixels represented by that percentage.
The scripting property is read/write for the Image class, but read-only for other controls.
NOTE: This property is not part of the HTML standard and as such may not work for all browsers.
This property will render on downlevel browsers for some controls only. It will not render downlevel for Label, HyperLink, LinkButton, any validator controls, or for CheckBoxList, RadioButtonList and DataList when their RepeatLayout property is Flow.
Style Members Style.Width Base Web Control Properties