ListBox的AutoPostBack = true;

解决方案 »

  1.   

    //假设你的DDL的id是BigClassList
    //确定DDL的selectIndex
    for (int i=0;i<BigClassList.Items.Count; i++)
    {
    if (BigClassList.Items[i].Text=="AAAAAA"))//判断如果某项的值是"AAA"
                                              // 如果是"AAA"就指定该项被选定
    BigClassList.SelectedIndex=i;//在这里指定DDL当前要选定的项
    }
      

  2.   

    忘了看,你的是LISTBOX
    但是LISTBOX和DropDownList类似吧
    通过SelectedIndex=值指定被选项
      

  3.   

    在ListBox的Load事件中加入判断,
    if(ListBox.Items[i].Select)
    {     ListBox.Items.Insert(0,ListBox.Items[i])  ;   
          ListBox.Items.Remove(ListBox.Items[i]);
    }
      

  4.   

    private void ListBox1_SelectedIndexChanged(object sender, System.EventArgs e)
    {
                      Session["BeforSelectIndex"] = ListBox1.selectIndex.tostring();
    show();
    }
      PageLode事件中加写
       if (Session["BeforSelectIndex"] != null)
          ListBox1.SelectIndex = int(Session["BeforSelectIndex"].tostring());