CSDN博客

img bgu

[我的ASP.net学习历程]ArrayList用法

发表于2004/9/21 19:40:00  916人阅读

分类: [My ASP/ASP.net(C#)]

<%@ 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>
0 0

相关博文

我的热门文章

img
取 消
img