我把代码贴出来,请帮我修改正确,谢谢!<script language="c#" runat="server">
void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{        
   label1.Text = "You selected " + DropDownList1.SelectedItem.Text;
}
</script>
......
<form runat="server">
      <asp:DropDownList id="DropDownList1" 
          AutoPostBack="true"  runat="server">
         <asp:ListItem>Item 1</asp:ListItem>
         <asp:ListItem>Item 2</asp:ListItem>
         <asp:ListItem>Item 3</asp:ListItem>
         <asp:ListItem>Item 4</asp:ListItem> 
      </asp:DropDownList>
<asp:label ID="label1" runat="server"/>
</form>

解决方案 »

  1.   

    <asp:DropDownList id="DropDownList1" 
              AutoPostBack="true"  runat="server" OnChange="DropDownList1_SelectedIndexChanged">
      

  2.   

    你都没加事件怎么能有反映呢:
    <asp:DropDownList id="DropDownList1" AutoPostBack="true"  runat="server" OnSelectedIndexChanged ="DropDownList1_SelectedIndexChanged">
      

  3.   

    在DropDownList属性中,选择时间,然后选择OnSelectedIndexChanged,双击,就会出现这个事件的函数,然后在函数中写如下代码 ——
              label1.Text = "You selected " + DropDownList1.SelectedItem.Text;
      

  4.   

    <asp:DropDownList id="zmYear" runat="server" AutoPostBack="True">
    <asp:ListItem Value="1999">1999</asp:ListItem>
    <asp:ListItem Value="2000">2000</asp:ListItem>
    </asp:DropDownList>
    属性窗口在加入OnSelectedIndexChanged事件
      

  5.   

    <asp:DropDownList id="DropDownList1" 
              AutoPostBack="true"  runat="server" OnChange="DropDownList1_SelectedIndexChanged">