Latest web development tutorials

ASP.NET Image controls

Web Server Controls Web server control

Definition and Usage

Image control is used to display images.


Attributes

属性 描述 .NET
AlternateText 图像的替代文本。 1.0
DescriptionUrl 对图像进行详细描述的位置。 2.0
GenerateEmptyAlternateText 规定该控件是否创建一个作为替代文本的空字符串。 2.0
ImageAlign 规定图像的排列方式。 1.0
ImageUrl 显示此链接的图像的 URL 1.0
runat 规定该控件是服务器控件。必须设置为 "server"。 1.0

Web Control Standard Properties

AccessKey, Attributes, BackColor, BorderColor, BorderStyle, BorderWidth, CssClass, Enabled, Font, EnableTheming, ForeColor, Height, IsEnabled, SkinID, Style, TabIndex, ToolTip, Width

For a full description, visit the Web Control Standard Attributes .

Control Standard Properties

AppRelativeTemplateSourceDirectory, BindingContainer, ClientID, Controls, EnableTheming, EnableViewState, ID, NamingContainer, Page, Parent, Site, TemplateControl, TemplateSourceDirectory, UniqueID, Visible

For a full description, go to Control Standard Attributes .


Examples

Image
In this example, we declare an Image control in an .aspx file.


Web Server Controls Web server control