ASP.NET中的Image和ImageButton控件

Image 控件用来显示图形。Image 控件可以显示来自位图、图标或元文件的图形,也可以显示增强的元文件、JPEG 或 GIF文件。

ImageButton 控件用于显示可点击的图像。

Image 控件的属性也能够用在 ImageButton 控件上。

属性说明
Attributes 返回此元素所有属性名和属性值.
BorderColor 指定ImageButton控件周围边框的颜色
BorderStyle 指定ImageButton控件周围边框的样式
BorderWidth 指定ImageButton控件周围边框的宽度
AlternateText 获取或设置当图像不可用时,ImageButton 控件中显示的替换文本。
Enabled 指示是否启用控件。
ID 此控件的唯一id。
ImageUrl 获取或设置在ImageButton控件中显示的图像的位置。
ImageAlign 获取或设置ImageButton控件相对于 Web 页上其他元素的对齐方式。
Visible 获取或设置一个值,该值指示服务器控件是否作为 UI 呈现在页上。
Width 获取或设置 Web 服务器控件的宽度。
runat 规定此控件是服务器控件。  必须被设置为"server"。
OnClick 在单击 ImageButton 时发生的事件。
OnCommand 在单击时发生的事件。
OnPreRender ImageButton控件将要呈现给其包含的 Page 对象时发生。
CommandArgument 获取或设置一个提供有关 CommandName 属性的附加信息的可选参数。
CommandName 获取或设置与 ImageButton 控件关联的命令名。
原文地址:https://www.cnblogs.com/xingxing00/p/3627841.html