System.Web.UI.HtmlControls.HtmlImage.Height Property

Gets or sets the height of the image.

Syntax

[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.DefaultValue(100)]
public int Height { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The HtmlImage.Height and HtmlImage.Width properties can be used two ways. You can use the HtmlImage.Height and HtmlImage.Width properties to send image size specifications to the browser. This displays the Web page faster because the browser does not need to recalculate the positions of elements on the page when the image loads.

You can also use the HtmlImage.Height and HtmlImage.Width properties to scale the image. When using values different from the physical size of the image, the image is resized accordingly. However, this method for scaling the image is not recommended because it takes longer for the page to display it. Instead, physically resize the image to the size you need.

By default, the HtmlImage.Height property is expressed in pixels, but it can also be expressed as a percentage of the size of the window.

Requirements

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