不要放在同一个UpdatePanel里面,因为,如果你做刷新的时候,它是整个UpdatePanel刷新的,那么你其它的dropdownlist也会刷新的吧。

解决方案 »

  1.   

    为什么要把所有的dropdownlist放到一个updatepanel里面?
      

  2.   

    一个updatepanel可以对应一个trigger。
    如果你有两个dropdownlist
    要求联动,只要把第二个放到updatepanel里面,trigger设置为第一个updatepanel即可
      

  3.   

    放在不同的updatepanel,其中一个刷新,其他panel也会刷新的
      

  4.   

    Updatepanel有2个属性  UpdateMode="Conditional" ChildrenAsTriggers="true"
    意思是由该updatepanel中的子控件触发该updatepanel的更新如果要触发更新的控件不在updatepanel中则使用UpdateMode="Conditional" 
    然后在updatepanel中添加子节点
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="btnWorkloadAdd" />
        <asp:AsyncPostBackTrigger ControlID="btnWorkloadDele" />
    </Triggers>
    triggers表示触发updatepanel更新的控件集合
      

  5.   

    放在不同的updatepanel,其中一个刷新,其他panel也会刷新的
    ================================不会啊 我都是这样做的啊 没有刷新哦
    你说刷新的是它会跳动吧?
      

  6.   

    放在不同的updatepanel,其中一个刷新,其他panel也会刷新的
    --------------------------------------------------
    UpdateMode="Conditional" 
      

  7.   

     <form id="form1" runat="server" enctype="multipart/form-data">
         <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>     
        <div>
         <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">    
                <ContentTemplate>
                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" Width="154px">
                      <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                    </asp:DropDownList>
                    <br />
                        <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="true" Width="155px">
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                    </asp:DropDownList>
                                                                
                </ContentTemplate> 
                </asp:UpdatePanel>                         
                  <asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="true" Width="156px">
                   <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                    </asp:DropDownList>      
        </div>    
        </form>
    点downlist1的时候,downlist2不刷新
      

  8.   

      <form   id="form1"   runat="server"   enctype="multipart/form-data"> 
              <asp:ScriptManager   ID="ScriptManager1"   runat="server"> 
                    </asp:ScriptManager>           
            <div> 
              <asp:UpdatePanel   ID="UpdatePanel1"   runat="server"   UpdateMode="Conditional">         
                            <ContentTemplate> 
                                    <asp:DropDownList   ID="DropDownList1"   runat="server"   AutoPostBack="true"   Width="154px"> 
                                        <asp:ListItem> 1 </asp:ListItem> 
                                            <asp:ListItem> 2 </asp:ListItem> 
                                            <asp:ListItem> 3 </asp:ListItem> 
                                            <asp:ListItem> 4 </asp:ListItem> 
                                    </asp:DropDownList> 
                                    <br   /> 
                                            <asp:DropDownList   ID="DropDownList2"   runat="server"   AutoPostBack="true"   Width="155px"> 
                                            <asp:ListItem> 1 </asp:ListItem> 
                                            <asp:ListItem> 2 </asp:ListItem> 
                                            <asp:ListItem> 3 </asp:ListItem> 
                                            <asp:ListItem> 4 </asp:ListItem> 
                                    </asp:DropDownList> 
                                                                                                                            
                            </ContentTemplate>   
                            </asp:UpdatePanel>                                                   
                                <asp:DropDownList   ID="DropDownList3"   runat="server"   AutoPostBack="true"   Width="156px"> 
                                  <asp:ListItem> 1 </asp:ListItem> 
                                            <asp:ListItem> 2 </asp:ListItem> 
                                            <asp:ListItem> 3 </asp:ListItem> 
                                            <asp:ListItem> 4 </asp:ListItem> 
                                    </asp:DropDownList>             
            </div>         
            </form>
      

  9.   

        <form id="form1" runat="server" enctype="multipart/form-data">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <div>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
                    <ContentTemplate>
                        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" Width="154px">
                            <asp:ListItem> 1 </asp:ListItem>
                            <asp:ListItem> 2 </asp:ListItem>
                            <asp:ListItem> 3 </asp:ListItem>
                            <asp:ListItem> 4 </asp:ListItem>
                        </asp:DropDownList>
                        <br />
                    </ContentTemplate>
                </asp:UpdatePanel>
                <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"  ChildrenAsTriggers="true">
                    <ContentTemplate>
                        <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="true" Width="155px">
                            <asp:ListItem> 1 </asp:ListItem>
                            <asp:ListItem> 2 </asp:ListItem>
                            <asp:ListItem> 3 </asp:ListItem>
                            <asp:ListItem> 4 </asp:ListItem>
                        </asp:DropDownList>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="true" Width="156px">
                    <asp:ListItem> 1 </asp:ListItem>
                    <asp:ListItem> 2 </asp:ListItem>
                    <asp:ListItem> 3 </asp:ListItem>
                    <asp:ListItem> 4 </asp:ListItem>
                </asp:DropDownList>
            </div>
        </form>
      

  10.   

    不要放到同一个UpdatePanel中 只把需要刷新的控件放到UpdatePanel中就好了 
      

  11.   

    <form   id="form1"   runat="server"   enctype="multipart/form-data"> 
                    <asp:ScriptManager   ID="ScriptManager1"   runat="server"> 
                    </asp:ScriptManager> 
                    <div> 
                            <asp:UpdatePanel   ID="UpdatePanel1"   runat="server"   UpdateMode="Conditional"   ChildrenAsTriggers="true"> 
                                    <ContentTemplate> 
                                            <asp:DropDownList   ID="DropDownList1"   runat="server"   AutoPostBack="true"   Width="154px"> 
                                                    <asp:ListItem>   1   </asp:ListItem> 
                                                    <asp:ListItem>   2   </asp:ListItem> 
                                                    <asp:ListItem>   3   </asp:ListItem> 
                                                    <asp:ListItem>   4   </asp:ListItem> 
                                            </asp:DropDownList> 
                                            <br   /> 
                                    </ContentTemplate> 
                            </asp:UpdatePanel> 
                            <asp:UpdatePanel   ID="UpdatePanel2"   runat="server"   UpdateMode="Conditional"     ChildrenAsTriggers="true"> 
                                    <ContentTemplate> 
                                            <asp:DropDownList   ID="DropDownList2"   runat="server"   AutoPostBack="true"   Width="155px"> 
                                                    <asp:ListItem>   1   </asp:ListItem> 
                                                    <asp:ListItem>   2   </asp:ListItem> 
                                                    <asp:ListItem>   3   </asp:ListItem> 
                                                    <asp:ListItem>   4   </asp:ListItem> 
                                            </asp:DropDownList> 
                                    </ContentTemplate> 
                            </asp:UpdatePanel> 
                            <asp:DropDownList   ID="DropDownList3"   runat="server"   AutoPostBack="true"   Width="156px"> 
                                    <asp:ListItem>   1   </asp:ListItem> 
                                    <asp:ListItem>   2   </asp:ListItem> 
                                    <asp:ListItem>   3   </asp:ListItem> 
                                    <asp:ListItem>   4   </asp:ListItem> 
                            </asp:DropDownList> 
                    </div> 
            </form>  
     
    放不同的Panel
     
      

  12.   

    放在不同的updatepanel里面.设置更新模式就好!