Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Image::ImageUrl Property

 

Gets or sets the URL that provides the path to an image to display in the Image control.

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

public:
[BindableAttribute(true)]
property String^ ImageUrl {
	virtual String^ get();
	virtual void set(String^ value);
}

Property Value

Type: System::String^

The URL that provides the path to an image to display in the Image control.

Use the ImageUrl property to specify the URL of an image to display in the Image control. You can use a relative or an absolute URL. A relative URL relates the location of the image to the location of the Web page without specifying a complete path on the server. The path is relative to the location of the Web page. This makes it easier to move the entire site to another directory on the server without updating the code. An absolute URL provides the complete path, so moving the site to another directory requires that you update the code.

The following example demonstrates how to use the ImageUrl property to specify the location of the image to display in the Image control.

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

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft