开发者

Ajax Popup extender lossing control

I am using 2 popup extender in my project The 1st one is given below which is use to display some information

 <asp:ModalPopupExtender ID="DEx" runat="server" TargetControlID="lk_modalPopup"   CancelControlID="pnCancel"   PopupControlID="panelD"></asp:ModalPopupExtender>
 <asp:Panel runat="server" ID="panelD"  Style="display: none">
 <div>
  <asp:LinkButton ID="lkImageUploader" runat="server" Text="Upload Image"></asp:LinkButton>

Inside this pop up extender there

<asp:ModalPopupExtender ID="ImageUploaderEx" runat="server" TargetControlID="lkImageUploader" CancelControlID="UploadCancel" PopupControlID="panelUploader" >      </asp:ModalPopupExtender>
 <asp:Panel runat="server" ID="panelUploader" Style="display: none" >
    <div class="RoundDivGreenfloat" style="width:300px;height:95px;" >
    <div class="RoundDivOrange" align="center"><span class="whitetext">Upload Image</span></div><br />
    <div><asp:FileUpload runat="server" ID="fu_Upload" /></div><br />
    <div align="center">
         <asp:Button ID="pnUpload" runat="server" Text="Upload" onclick="pn开发者_JS百科Upload_Click"/>
         <asp:Button ID="UploadCancel" runat="server" Text="Cancel" />
     </div>
   </div>

The link button inside the top panel is the one which opens the file uploader panel. The problem I m facing is that when I click on the file uploader ie popup inside a popup then , Upload button It closes both the popup. I just want only file uploader popup to be closed


Since in the pnUpload_Click the postback occurs and will load the page once again. This is the reason why it is closing both popups.

One method is make an ajax call in the client click of pnUpload and do the server side code. After that hide the upload popup from javascript and this will show the first popup as such.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜