DropDownList 的 itemchange事件中清了吗?

解决方案 »

  1.   

    难道大家都没遇到过这样的问题!
    我感觉很奇怪,应为我写定了DropDownList时就没此问题的,只是动态绑定数据后
    <asp:dropdownlist id="DDL1" runat="server" AutoPostBack="True" Font-Size="8">
    <asp:ListItem Value="topic_f" Selected="True"> 公告标题 </asp:ListItem>
    <asp:ListItem Value="auther_f"> 公告作者 </asp:ListItem>
    <asp:ListItem Value="time_f"> 发布时间 </asp:ListItem>
    </asp:dropdownlist>
      

  2.   

    刷新是因为AutoPostBack="True"的原因,如果我在刷新重新绑定,即在if(!this.IsPostBack)外重新绑定,那选中的项只会是第一项,你选中别的项将会刷新成回到第一项!!!
      

  3.   

    在Page_OnLoad()
    {
       if (!IsPostBack)
      {
       }
    }
      

  4.   

    去掉
    if (!IsPostBack)
      

  5.   

    回 zlc810821(卷心菜) 
    去掉后则只能选第一项了,因为DropDownList的AutoPostBack="True"!!
      

  6.   

    查看一下 PageLoad 以前的方法,是否有对 Dropdownlist 操作。另外,检查是否执行了 databind()。
      

  7.   

    to catman3000(catman) :
    我的绑定程序在上面,请指教!!!
      

  8.   

    终于搞定了,原来要在private void InitializeComponent()里绑定数据,我试了五种绑定方法,原以为是方法问题(其实心里感觉不是),也是了各种加载,原来都不是!谢各位,结贴!!!!