System.Web.UI.HtmlControls.HtmlImage.Src Property

Gets or sets the source of the image file to display.

Syntax

[System.Web.UI.UrlProperty]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.DefaultValue("")]
public string Src { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use this property to specify the path to the image file to display. If the image file is in the same directory as the Web page source file that uses it, you can just specify the file name. Otherwise, you must also include the path to the file. The path can be absolute or relative to the directory that contains the Web page source file. You can use the relative path " ~/ " to refer to the current virtual directory where the page is located. For example, the value of HtmlImage.Src for <img runat="server" src="~/abc/d.gif"> on a page in the "XspTest" virtual directory is <img src="/XspText/abc/d.gif">.

Requirements

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