'modalPopup'에 해당되는 글 1건

  1. 2014.08.06 modalPopup에서 dropdownlist의 SelectedIndexChanged 적용
ASP.NET2014. 8. 6. 22:24

기본적으로 아무 처리 없이 하면 modalPopup postback 하면서 새 창을 열어버린다.

이럴때는 이벤트 발생시키는 놈과 이벤트 받는 놈 둘다 updatePanel을 걸어주면 된다.

 

 <asp:UpdatePanel ID="UpdatePanel1" runat="server">    
          <ContentTemplate>
                 <asp:DropDownList ID="ddlCallCenter" AutoPostBack="true" runat="server" OnSelectedIndexChanged="ddlCallCenter_SelectedIndexChanged"></asp:DropDownList>
                  </ContentTemplate>
         </asp:UpdatePanel> 

///////////////

<asp:UpdatePanel ID="UpdatePanel2" runat="server"> 
       <ContentTemplate>
             <asp:DropDownList ID="ddlCompany" runat="server"></asp:DropDownList>
       </ContentTemplate>            

</asp:UpdatePanel>

///////////////////////////

물론 updatePanel을 사용하기 위해서는 상단에 아래와 같이 ScriptManager을 명기해 준다!

<asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>

Posted by 댓거리사랑