Last post Aug 13, 2020 10:26 AM by XuDong Peng
Aug 11, 2020 06:33 AM|ShatterStar|LINK
I am trying to make a jquery ajax call to one of the functions in my .cs file in webforms but the ajax call doesn't execute and in the dev tools i find 404 errors for MicrosoftAjax.js and MicrosoftAjaxWebForms.js. I have tried re-installing these packages
into my solution but I still get those to errors. My solution also didn't have a route config which I added in. How do I resolve the 404 errors on the two ajax files which is why I suspect my ajax calls aren't working.
Aug 12, 2020 03:17 AM|XuDong Peng|LINK
It seems that you can't import js correctly.
Have you tried adding ScriptManager control to the page:
<head runat="server"> <title></title></head><body>
<form id="form1" runat="server">
Or you could refer to some of the things done in How to Use CDN for MicrosoftAjax.js with ASP.NET Ajax 4 & Ajax Control
Hope this can help you.
Aug 12, 2020 12:30 PM|ShatterStar|LINK
Hi I don't think I have, what would this do?
Aug 13, 2020 10:26 AM|XuDong Peng|LINK
Using this control, it will import these two js files into the resource without manually importing them, as shown in my sample code.
I want to know whether you have modified the BundleConfig.cs file in the App_Start folder?
On the other hand, what method do you call using jquery ajax, WebMethod or other?
If possible, please provide more details, mainly include: