举例 :取出a,b等内容(内容是动态的)         
<asp:DropDownList ID="attachments" runat="server">
           <asp:ListItem Value="-1" Selected="True">附 件 清 单...</asp:ListItem>
              <asp:ListItem>a</asp:ListItem>
              <asp:ListItem>b</asp:ListItem>
                </asp:DropDownList>

解决方案 »

  1.   


    Response.Write(attachments.SelectedItem.Text);
      

  2.   

    在後台取如樓上的,
    如果要在前台取則js如下:var attachments = document.getElementById("attachments");var text = attachments.options[attachments.selectedIndex].text
      

  3.   


    string mm = "";
    foreach(ListItem item in this.attachments.Items)
    {
        mm += item.Value;
    }return mm;
      
    ---------------------------------------------
    EMail:[email protected] 请给我一个与您交流的机会!