Net-informations.com
SiteMap  | About    

Image Control

Image control is to display any valid image supported by the requesting browser on the Web page. The path to the displayed image is specified by setting the ImageUrl property.

image-control

vb.net

  Image1.ImageUrl = "http://net-informations.com/logo.png"

C#

  Image1.ImageUrl = "http://net-informations.com/logo.png";

You can specify the text to display in place of image when the image is not available by setting the AlternateText property.

vb.net

  Image1.AlternateText = "Net-informations.com Logo"

C#

  Image1.AlternateText = "Net-informations.com Logo";

The following ASP.NET program load an Image from a URL and set an alternate text.

Default.aspx

  

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<title>Untitled Page</title>
</head>
<body>
	<form id="form1" runat="server">
	<div>
		<asp:Image ID="Image1" runat="server" />
	</div>
	</form>
</body>
</html>


Click the following links to see full source code

C# Source Code
VB.NET Source Code
default.aspx.cs
default.aspx.vb






net-informations.com (C) 2017    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.