0

My Asp.NET Web Form (.aspx) pages uses the MicrosoftAjax.js file like :

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

I want to replace this legacy MicrosoftAjax.js with Typescript. I came across this TypeScript Port for AJAX framework on git that demonstrates re-implementation of AJAX framework with TypeScript but I am not sure how this can replace the MicrosoftAjax.js in an HTML/JS .aspx page.

Has anyone been through a similar re-implementation ? All I need is the steps or a working example that can provide me clues to achieve this migration.

Liam
  • 27,717
  • 28
  • 128
  • 190
DotNetSpartan
  • 931
  • 4
  • 20
  • 41
  • what functionalities of micrososftajax are you using? – Leandro Bardelli Sep 28 '21 at 18:23
  • @LeandroBardelli: The functionalities to register class, interface, namespace and types. – DotNetSpartan Sep 29 '21 at 09:32
  • your using the ajaxcontroltoolkit in 2021? Wow. That thing must be 10 years old. You really should think about upgrading whatever it is your building – Liam Sep 29 '21 at 13:10
  • What does this have to do with typescript? – Liam Sep 29 '21 at 13:10
  • @Liam: I am looking for possible steps to translate the functionality to register class, interface, namespace and types from MicrosoftAjax.js (ajaxtoolkit) to Typescript so that it can be used by the .aspx page. The requirement is to dynamically load the content of the web page without refreshing it. Ajax has some issues with eval() method that raise security concerns. I know that SPA(Single page applications using React or Angular) solve the same purpose but I want minimum changes to the existing pages. Hence, All I want is to migrate my .aspx pages from using Ajax to Typescript. – DotNetSpartan Sep 29 '21 at 13:50
  • *MicrosoftAjax.js (ajaxtoolkit) to Typescript* That makes no sense. Typescript just gets compiled back into JS so it would be a pointless task – Liam Sep 29 '21 at 14:15
  • You can't just turn the ajaxtoolkit to Typescript and expect it to somehow work like React. There's 10years of changes between the two technologies. They work in radically different ways. You can also [send ajax requests using vanilla JS in 2021](https://stackoverflow.com/questions/9713058/send-post-data-using-xmlhttprequest) (well actually since 2012), so there isn't really any point in using the AJTC anymore. – Liam Sep 29 '21 at 14:18
  • So much of this question makes no sense. Tl;dr no, **there is no magic way to turn your legacy asp.net project into a modern single page app simply by running some script**. – Liam Sep 29 '21 at 14:19

0 Answers0