Any way to use ASP.NET AJAX when my server does not and can not have the ASP.NET AJAX extensions Installed?

蓝咒 提交于 2019-12-10 23:07:48

问题


I have a server with .Net 2.0 sp1 installed and have no ability to install the AJAX extensions on the server.

Is there anyway I could work around this to incorporate ASP.NET AJAX functionality?


回答1:


You don't need to install the AJAX extensions into the server's GAC.

You can locally reference System.Web.Extensions.dll from your applications BIN folder....I've done it half a dozen times.

Copy that DLL to your projects local bin. Reference it from your project. Remember to deploy the DLL when you deploy, and you are set.




回答2:


Theres always prototype and jQuery for AJAX calls.

Both of which are perfectly valid for making Ajax calls to the server, despite Jonathan Hollands persistence (and his down-voting of everyone else's response) to the contrary.

MS now packages jQuery with Visual Studio, so there is no interoperability problem.

Please remember that the server has no knowledge of controls created on the client side, and you will have to take the extra steps to persist any data (via ajax calls) to the server.




回答3:


If you can't install AJAX extensions, you will have to manage the AJAX calls yourself. It's absolutely possible, since AJAX Extensions just wrap the meat of AJAX. Read up on XMLHttpRequest and you'll find many examples.

Here's a good site with examples. http://www.fiftyfoureleven.com/resources/programming/xmlhttprequest/examples




回答4:


Note that most of AJAX is done on the client side (in the browser) in Javascript.

While there are some server-side libraries to make responding to a AJAX query easier, for the most part they are unnecessary. Any server technology that can server a web page to a browser can handle an AJAX request just as well.




回答5:


Microsoft ASP.NET AJAX is not the only way to implement AJAX Functionality. jQuery and Prototype are two popular javascript libraries for working with AJAX, regardless of server platform.

If you're tied 100% to Microsoft ASP.NET AJAX, then you may need to download it and install the DLL manually to your local project.



来源:https://stackoverflow.com/questions/273418/any-way-to-use-asp-net-ajax-when-my-server-does-not-and-can-not-have-the-asp-net

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!