private void Page_Load(object sender, System.EventArgs e)
{
if(!Page.IsPostBack)
{
把你的方法放在这里,在试试看
}
}

解决方案 »

  1.   

    dic.Type =this.dropdown_type .SelectedItem .Text 
    改为
    dic.Type =this.dropdwon_type.itmes[this.dropdown_type .SelectedIndex].text
      

  2.   

    把绑定dropdownlist的程序段放到if(!Page.IsPostBack){}里面,否则重新绑定,你的选择当然丢失了
      

  3.   

    把dropdownlist连接数据库 取值的程序 放在页面的加载事件中的
    if not ispostback then 
        你的dropdownlist()
    end if 
      

  4.   

    非常感谢两位的帮助,我用preaser(飞语之梦)的方法解决了这个问题,能告诉我为什么吗?
      

  5.   

    你每次选择DropDownList控件的一个新项时,会触发一个SelectedIndexChanged事件。如果你的DropDownList控件的AutoPostBack属性为True的话,还会产生回发,这样服务器就会调用Page_Load函数,如果你把你的初始化代码写在下面的地方的话,
    private void Page_Load(object sender, System.EventArgs e)
    {
    初始化代码
    }
    则你每次选择DropDownList控件的一个新项时,都会执行你的初始化代码。所以始终是你的初始选项。
    如果你把你的初始化代码写在下面的地方的话,
    private void Page_Load(object sender, System.EventArgs e)
    {
    if(!Page.IsPostBack)
    {
    初始化代码
    }
    }
    则你每次选择DropDownList控件的一个新项时,虽然会调用Page_Load函数,但是Page.IsPostBack属性为True,!Page.IsPostBack为False,所以不会再调用你的初始化代码。
      

  6.   

    当你选定下拉框中的项时,页面要重新加载,选定的状态被覆盖。若放在
    if(!Page.IsPostBack)
    {
    }
    里面,确保二次加载时该控件的操作状态得到保存