Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

How to have UpdatePanel's partial page postbacks with the 3 MS Ajax Framework files loaded in JS file bundle but not from ScriptManager (with AjaxFrameworkMode="Disabled")

$
0
0

Hi there,

I have an ASP.NET application where I would like to put the MS Ajax Framework files inside a JS files bundle:

  • ~/Scripts/WebForms/WebForms.js
  • ~/Scripts/WebForms/MSAjax/MicrosoftAjax.js
  • ~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js

This bundle will be loaded by all pages and works OK.

Also, I tried to "shutdown" the "automatic" loading of the 3 files above by the ScriptManager by using the following tag:

<asp:ScriptManager ID="ScriptManager" AjaxFrameworkMode="Disabled" runat="server" />

The ScriptManager control is currently coded on every single aspx web page.

The tag above also works fine, as long as there isn't any UpdatePanel inside the web page:

  • the 3 MS Ajax Framework files are loaded only on the JS file bundle (their automatic loading is stopped)
  • and the web page works fine with the 3 MS Ajax Framework files on the bundle.

However, if the AjaxFrameworkMode="Disabled" is applied to an aspx web page with an UpdatePanel,the partial postbacks of the UpdatePanel stop occurring and afull page postback (with the typical flickering refresh) occurs instead !

Here's an example:

<%@ Page Language="c#" Inherits="Abc.Web.Maintenances.Accounts.Accounts.Account_Set_Comps" CodeBehind="Account_Set_Comps.aspx.cs" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><ABC:Head ID="Head" runat="server" /></head><body><form method="post" id="Form1" runat="server"><asp:ScriptManager ID="sm" AjaxFrameworkMode="Disabled" runat="server" /><ABC:Title ID="PageTitle" UpdatePanel="true" runat="server" /><asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server"><ContentTemplate><ABC:PageTable ID="PageTable" runat="server"><ABC:MaintenanceGrid ID="DataGridMaster" DataKeyField="ID" UseUpdatePanel="true"  runat="server"/></ABC:PageTable><ABC:MaintenancesActions Insert="true" View="true" Delete="true" Copy="true" MultiIO="true"
                    MultiIOImportExport="true" MultiIOTemplate="true" MultiIOLog="true" MultiIOExportPdf="true" 
                    MultiIOExportRefId="true" Excel="true" Expand="true" MultiIOAutomation="true" 
                    ID="MaintenancesActions" runat="server" /></ContentTemplate></asp:UpdatePanel></form></body></html>

From all the trials I've done it seems to me that the UpdatePanel requires the 3 MS AJax Framework files to be loaded "automatically" by the ScriptManager (AjaxFrameworkMode="Enabled" or absent as it's the default) for the UpdatePanel's partial page postbacks to work.

Is there any way to use AjaxFrameworkMode="Disabled" in ScriptManager + loading the 3 MS AJax Files Bundle and have the UpdatePanel's partial page postbacks ?

Thanks in advance,

Miguel G.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>