vb.net控件详解 vbnet控件大全( 二 )


(2) Src属性
(3) Alt属性
(4) Border属性
(5) Height属性
(6) Width属性8. HtmlInputCheckBox控件HtmlInputCheckBox控件的主要属性和事件如下:
(1)Checked属性
(2) OnServerChange方法
9. HtmlInputRadioButton控件 HtmlInputRadioButton控件的主要属性和事件如下:
(1)Checked属性
(2)Name属性
(3) Value属性
(4) ServerChange事件
(5) OnServerChange方法
10. HtmlSelect控件该控件的主要属性和事件如下:
(1)Multiple属性
(2) Size属性
(3) SelectedIndex属性
(4) Items属性
(5)Value属性
(6) DataSource属性
(7) DataValueField属性
(8)DataTextField属性
(9)OnServerChange方法
11. 其他HTML服务器控件 其他HTML服务器控件对应的HTML元素及用途见右表 。4.3 Web服务器控件
4.3.1 Web服务器控件的层次结构 下图显示了System.Web.UI.WebControls名称空间中控件的层次结构 。4.3.2 Web服务器控件基本语法 Web服务器控件的基本语法:
ASP: 控件Id=“控件名称” Runat=“Server” 属性1=“属性设置值1” 属性2=“属性设置值2”……/ASP: 控件 或者
ASP: 控件Id=“控件名称” Runat=“Server”/ 属性1=“属性设置值1” 属性2=“属性设置值2”…… /
4.3.3 Web服务器控件详解
1. Button控件
Button控件的使用语法:
ASP: Button 属性设置/ASP: Button 或者
ASP: Button 属性设置 /
Button控件主要属性和事件如下:
(1)Enabled属性
(2) Text属性
(3) ToolTip属性
(4) CommandName属性
(5)CommandArgument属性
(6)OnClick事件
2. HyperLink控件
HyperLink控件的使用语法:
ASP: Hyperlink 属性设置/ASP: Hyperlink或者
ASP: Hyperlink 属性设置 /
HyperLink控件的主要属性如下:
(1) Text属性
(2) ImageUrl属性
(3) NavigateUrl属性
(4) Target属性
3. LinkButton控件
LinkButton控件的使用语法:
ASP: LinkButton 属性设置 /ASP: LinkButton或者
ASP: LinkButton 属性设置 /
LinkButton控件的主要属性和事件如下:
(1) Text属性
(2) Enabled属性
(3) ToolTip属性
(4) CommandName属性
(5) CommandArgument属性
(6)Command事件
4. ImageButton控件
ImageButton控件使用语法:
ASP: ImageButton 属性设置 /ASP: ImageButton 或者
ASP: ImageButton 属性设置 /
ImageButton控件的主要属性和事件如下:
(1) Enabled属性
(2) CommandName属性
(3) CommandArgument属性
(4) ImageUrl属性
(5) ImageAlign属性
(6) ToolTip属性
(7)OnClick事件
5. Label控件 Label控件使用语法:
ASP: Label 属性设置 /ASP: Label或者
ASP: Label 属性设置 /
Label控件的主要属性:
(1) AutoSize属性
(2) Text属性
(3) TextAlign属性:该属性设置标签内的文本的对齐方式 。取值及其含义见表 。(4) Font属性
(5) Height属性
(6)Width属性
6. TextBox控件
TextBox控件使用语法:
ASP: TextBox 属性设置 /ASP: TextBox或者
ASP: TextBox 属性设置 /
TextBox控件的主要属性和事件如下:
(1) AutoPostBack属性
(2) Columns属性
(3) Rows属性
(4) MaxLength属性
(5) ReadOnly属性
(6) Text属性
(7) Wrap属性
(8) TextMode属性
7. CheckBox控件和CheckBoxList控件
CheckBox控件使用语法:
ASP: CheckBox 属性设置/ASP: CheckBox 或者
ASP: CheckBox属性设置 /
CheckBox控件的主要属性和事件
(1) Checked属性
(2) Enabled属性
(3) Text属性
(4) TextAlign属性
(5) AutoPostBack属性
(6)CheckedChanged事件
CheckBoxList控件是一个CheckBox控件组,CheckBoxList控件使用语法:

推荐阅读