[我的ASP.net学习历程]CheckBoxList和RadioButtonList的数据梆定

类别:Asp 点击:0 评论:0 推荐:
<%@ Page Language="C#" AutoEventWireup="True" %>
<Script language="C#" runat="server">
void Page_Load(Object Sender,EventArgs e){
 ArrayList array=new ArrayList();
 array.Add("Windows");
 array.Add("Linux");
 array.Add("unix");
 CheckBox_1.DataSource=array;
 CheckBox_1.DataBind();
 RadioList_1.DataSource=array;
 RadioList_1.DataBind();
}
</Script>
<form id="Form_1" runat="server">
<asp:checkboxList ID="CheckBox_1" runat="server"/>
<input id="Button_1" type="Button" value="CheckButton" runat="server"/>
<asp:radiobuttonlist ID="RadioList_1" runat="server"/>
<input id="Button_2" type="Button" value="RadioButton" runat="server"/>
</form>

本文地址:http://com.8s8s.com/it/it8578.htm