Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
this is the modal page to be loaded.
ASP.NET
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" ChildrenAsTriggers="false" runat="server">
        <ContentTemplate>
            <asp:GridView ID="gridetails" runat="server" 

  ..... </asp:GridView>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="gridetails" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>

in this modal form
JavaScript
$(document).on("click", "#Loadqty_detl", function () {
       var dlg1=  $('<div id=DialogDiv>').dialog({
           height: $(document).height() - 100,
           width: $(document).width() - 100,
           appendTo:"form",
           closeOnEscape: true,
           autoOpen: false,
           modal: true,
           title: "Entry form",
           open: function () {
               $(this).load('Ord_Quantitydetl.aspx');
           },
           show: {
               effect: "blind",
               duration: 500
           },
           hide: {
               effect: "clip",
               duration: 1000
           },
           buttons: {
               Close: function () {
                   $(this).dialog("close");
               }
           }
       });

       var reload = dlg1.dialog("open");
       Sys.Application.add_init(reload);

   });

but as long as scripmanager or updatepannel is uncommented this gridview is not loaded as aresult blank modalpopup is shown.
Posted
Comments
Sinisa Hajnal 6-Feb-15 4:01am    
Ajax and updatepanel don't play nice with each other. For example even AjaxToolkit Autocomplete Extender will not work within UpdatePanel.
varun150 6-Feb-15 4:03am    
what can i do then?
/\jmot 6-Feb-15 4:37am    
use one of these. :P
Sinisa Hajnal 6-Feb-15 4:53am    
Well, you can put the grid outside of the update panel. Since you're opening modal dialog, it doesn't need to be inside for refreshes or something...you could try setting children as triggers to true and play with that.
varun150 6-Feb-15 5:00am    
but problem is that when i put update pannel even outside of grid or inside of grid then no page content is visible.

1 solution

i had problems with JavaScript libraries after adding this script manager and update panel that was the reason.resolving those errors with devoloper tool does the job.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900