skip to Main Content

The HTML/JS .aspx pages in my ASP.NET application use the MicrosoftAjax.js file like :

<script src="../../Scripts/MicrosoftAjax.js"></script>

Considering MicrosoftAjax.js is very old, I want to replace the AJAX file with jQuery and serve the same purpose. I am a bit not clear how complex this change would be and its impact as I am not much familiar with JQuery.

Are there any specific steps that i can follow to do these change ?

2

Answers


  1. JQuery and Microsoft Ajax are two different libraries, and if you’re using one, it will probably be complicated to switch to the other one, but it really depends on how much you’re using it. As wazz commented, if you’re using an updatepanel, you can’t just use that with jquery. So if you’re using it with any .NET controls, you’ll want to find alternatives for those, and then if you have any custom javascript using ms ajax, you’ll have to figure out how to rewrite it in jquery.

    Overall, if you’re concerned about out-of-date technologies you’re probably better off upgrading the site out of webforms entirely if that’s an option for you, rather than trying to just update this single aspect.

    Login or Signup to reply.
  2. To meet these requirements, it’s necessary a hard work job: The best practice for migrate this case is creating a new Visual Studio Web Forms Project assembly, and migrating one-by-one aspx page: for each aspx page, you create a new aspx at new project, copying only region with controls (and following a copying code-behind too). After this steps, you need to substitute each javascript logic routines that consumes MicrosoftAjax.js to routines that consumes JQuery library.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search