"Multiline" Rows="3"> TextBox1 </asp:TextBox>

<asp:TextBox runat="server" Mode="Password"></asp:TextBox>
 CheckBox 控件用于生成能够在选中和清除这两种状态间切换的复选框:
<asp:CheckBox runat="server" Text="CheckBox1" Checked="True"> </asp:CheckBox>
 RadioButton 控件与 CheckBox 控件相似,但使用时通常会与其它 RadioButton 控件组成一组,以提供一组互斥的选项:
<asp:RadioButton runat="server" Text="RadioButton1" GroupName="Group1" Checked="true"> </asp:RadioButton> <asp:RadioButton runat="server" Text="RadioButton2" GroupName="Group1"></asp:RadioButton>
选择控件
下面的四个控件提供了允许用户从展示给他们的选项中进行选择的机制。选项列表的内容既可像下面的示例中那样是静态定义的,也可以使用数据源来动态填充。
DropDownList 控件提供了将选项显示为下拉式列表,并从中进行单项选择的能力:
<asp:DropDownList runat="server"> <asp:ListItem Text="Choice1" Value="1" selected="true"/> <asp:ListItem Text="Choice2" Value="2"/> </asp:DropDownList>
 ListBox 控件能够以可滚动列表的形式显示选项,并允许从中选择单个或多个选项:
<asp:ListBox runat="server" SelectionMode="Multiple"> <asp:ListItem Text="Choice1" Value="1" selected="true"/> <asp:ListItem Text="Choice2" Value="2"/> </asp:ListBox>
 上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页 |