梦想的起点

my shop:http://fashion-for-you.taobao.com/

导航

简单的动态添加dropdownlist

<script runat="server">
     void Page_Load(Object sender,EventArgs e){
          ArrayList al = new ArrayList();
          al.Add( "选项1" );
          al.Add( "选项2" );
          al.Add( "选项3" );
          al.Add( "选项4" );
          DropDownList1.DataSource = al ;
          DropDownList1.DataBind();
     }
</script>

<html>
    <head>
    </head>
    <body>
        <asp:DropDownList id="DropDownList1" runat="server" />
    </body>
</html>

posted on 2010-03-02 08:04  梦想的起点  阅读(283)  评论(0)    收藏  举报