How can i bundle MicrosoftAjax.js and MicrosoftAjaxWebForms.js
See original GitHub issueASP.net 4.5, ajaxtoolkit 16.1 latest
I have downloaded both files into my script folder
Then i bundle them like this in the global.asax file
void Application_Start(object sender, EventArgs e)
{
System.Web.Routing.RouteTable.Routes.Ignore("{resource}.axd/{*pathInfo}");
RegisterRoutes(System.Web.Routing.RouteTable.Routes);
var ajaxBundle = new ScriptBundle("~/bundles/MsAjaxJs");
ajaxBundle.Include(new string[] {
"~/Scripts/MicrosoftAjax.js",
"~/Scripts/MicrosoftAjaxWebForms.js"
});
BundleTable.EnableOptimizations = true;
BundleTable.Bundles.Add(ajaxBundle);
}
Then in my page i use them like this but it is not working
inside head
<asp:PlaceHolder runat="server">
<%:System.Web.Optimization.Styles.Render("~/bundles/MsAjaxJs") %>
</asp:PlaceHolder>
Inside body
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
<asp:ScriptManager runat="server" ID="SC1" ScriptMode="Release" LoadScriptsBeforeUI="true"
EnablePartialRendering="true">
<Scripts>
<asp:ScriptReference Path="~/bundles/MsAjaxJs" ScriptMode="Release" />
</Scripts>
</asp:ScriptManager>
But, I still see ScriptResource.axd
files are called which contains MicrosoftAjax.js
and MicrosoftAjaxWebForms.js
with addition to my bundle file
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How can i bundle MicrosoftAjax.js and ... - MSDN
User1570265326 posted. ASP.net 4.5, ajaxtoolkit 16.1 latest. I have downloaded both files into my script folder. Then i bundle them like ...
Read more >Getting pageLoad error in MicrosoftAjax.js - Stack Overflow
I am experiencing some errors with the raiseLoad function in MicrosoftAjax.js after they have logged on. MicrosoftAjax.js is loaded as a bundle
Read more >[Solved] How to get rid of unwanted script tags - CodeProject
DebugPath = "~/Recursos/Scripts/Webforms/MSAjax/MicrosoftAjaxWebForms.js"; BundleConfig.RegisterBundles(BundleTable.Bundles); RouteConfig.
Read more >MicrosoftAjax.js throwing an error in UI for ASP.NET AJAX
I have a RadGid with an inline edit from that contains a RadEditor on adding a new row the RadEditor is no longer...
Read more >Where are the ASP.NET AJAX Library JavaScript files?
You don't need to install the Microsoft AJAX Library if you are using Visual Studio ... microsoftajax.js, microsoftajaxwebforms.js, microsoftajaxtimer.js, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
for example i tried like this but still that file is rendered twice
I want to use only my local file so i can modify and use it
@FurkanGozukara If you check scripts content in browser’s debugger you will note that its content differs from the files that you put into the bundle. These scripts are added automatically from the
System.Web.Extensions
assembly when you place ScriptManager on your page.You can not stop rendering them, but you can order ScriptManager to include it into your bundle. To do this, add this lines to your code:
and replace ScriptReference
Path
attribute withName
attribute: