日期:2014-05-17  浏览次数:20467 次

下拉列表值改变问题
用.net开发的一个Web应用程序,实现的功能是改变下拉列表中的值时,在Label标签中显示改变之后的值。
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
  {
  Label1.Text = DropDownList1.SelectedItem.Text;
  }

但是Label标签的值一直无法改变,为什么?

------解决方案--------------------
事件触发了么 前台autopostback=true
pageload事件中加if(!IsPostBack){}了么
------解决方案--------------------
设置DropDownList控件的AutoPostBack为true