<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="gb2312" %>
<Script language="C#" runat="server">
void Page_Load(Object Sender,EventArgs e){
Response.Write(Select_1.Value);
ArrayList Array=new ArrayList();
Array.Add("Microsoft");
Array.Add("Linux");
Array.Add("Unix");
Select_1.DataSource=Array;
Select_1.DataBind();
}
//比较用Page_Load和用Button提交页面的效果
void SelectButton(Object Sender,EventArgs e){
Div_1.InnerHtml=Select_1.Value;
}
</Script>
<form id="Form_1" runat="server">
<select id="Select_1" runat="server"/>
<input type="button" OnServerClick="SelectButton" value="Submit" runat="server"/>
</form>
<div id="Div_1" runat="server"></div>