Please can someone give me some direction on the best way to implement AJAX?
请谁给我一些关于实现AJAX的最佳方法的指导?
Basically i have a classic ASP site that has recently been upgraded to .Net, and i've got the scenario where i would like a slow page to be displayed quickly. Part of the data displayed on the page takes several seconds to load, i would like to load up everything else, and use AJAX to load the slow part.
基本上,我有一个经典的ASP站点,最近已经升级到。net,我有一个场景,我想要一个缓慢的页面被快速显示。页面上显示的部分数据需要几秒钟才能加载,我希望加载其他所有数据,并使用AJAX加载缓慢的部分。
I'm not sure what the best method is? Should i be using jQuery, AJAX controls, etc.?
我不知道最好的方法是什么?我应该使用jQuery、AJAX控件等等吗?
Sorry if this has been asked before, just looking for some pointers or good links. Thanks
抱歉,如果你之前问过这个问题,只是想找一些指针或好的链接。谢谢
3 个解决方案
#1
2
I think jQuery would be a great choice to plug into a classic ASP site. This link has some decent content for first-time ajaxers with jQuery:
我认为jQuery将是一个很好的选择,插入到一个经典的ASP站点中。这个链接为初次使用jQuery的ajax用户提供了一些不错的内容:
http://articles.sitepoint.com/article/ajax-jquery
http://articles.sitepoint.com/article/ajax-jquery
#2
1
You can use AJAX controls to get AJAX functionality, and that would be the fastest and easiest way to implement AJAX.
您可以使用AJAX控件来获得AJAX功能,这将是实现AJAX的最快和最简单的方式。
However, if you are wanting to learn more about how to implement AJAX, and want a better overall solution, I would suggest jQuery. jQuery is faster, will give you more flexibility, and what you learn will be transferable to other web technologies like PHP, JSP, etc.
但是,如果您想了解更多关于如何实现AJAX的知识,并希望得到更好的整体解决方案,我建议jQuery。jQuery更快,会给您更大的灵活性,并且您学到的知识可以转移到其他web技术,如PHP、JSP等。
#3
0
This is a useful link describing using the jQuery .load() function, which is how you get jQuery to load up page elements asynchronously:
这是一个使用jQuery .load()函数描述的有用链接,它是使jQuery异步加载页面元素的方法:
http://api.jquery.com/load/
An example on how to use it can be found in the following (self promoting) blog post:
关于如何使用它的一个例子可以在以下(自我推销)的博客文章中找到:
http://iainhoult.blogspot.com/2010/07/using-jquery-to-asynchronously-load.html
http://iainhoult.blogspot.com/2010/07/using-jquery-to-asynchronously-load.html
I think if you wanted to go the jQuery route for AJAX then this would fit in well with your converted ASP website.
我认为如果你想要使用jQuery的jQuery路由,那么这将与你的ASP网站相适应。
#1
2
I think jQuery would be a great choice to plug into a classic ASP site. This link has some decent content for first-time ajaxers with jQuery:
我认为jQuery将是一个很好的选择,插入到一个经典的ASP站点中。这个链接为初次使用jQuery的ajax用户提供了一些不错的内容:
http://articles.sitepoint.com/article/ajax-jquery
http://articles.sitepoint.com/article/ajax-jquery
#2
1
You can use AJAX controls to get AJAX functionality, and that would be the fastest and easiest way to implement AJAX.
您可以使用AJAX控件来获得AJAX功能,这将是实现AJAX的最快和最简单的方式。
However, if you are wanting to learn more about how to implement AJAX, and want a better overall solution, I would suggest jQuery. jQuery is faster, will give you more flexibility, and what you learn will be transferable to other web technologies like PHP, JSP, etc.
但是,如果您想了解更多关于如何实现AJAX的知识,并希望得到更好的整体解决方案,我建议jQuery。jQuery更快,会给您更大的灵活性,并且您学到的知识可以转移到其他web技术,如PHP、JSP等。
#3
0
This is a useful link describing using the jQuery .load() function, which is how you get jQuery to load up page elements asynchronously:
这是一个使用jQuery .load()函数描述的有用链接,它是使jQuery异步加载页面元素的方法:
http://api.jquery.com/load/
An example on how to use it can be found in the following (self promoting) blog post:
关于如何使用它的一个例子可以在以下(自我推销)的博客文章中找到:
http://iainhoult.blogspot.com/2010/07/using-jquery-to-asynchronously-load.html
http://iainhoult.blogspot.com/2010/07/using-jquery-to-asynchronously-load.html
I think if you wanted to go the jQuery route for AJAX then this would fit in well with your converted ASP website.
我认为如果你想要使用jQuery的jQuery路由,那么这将与你的ASP网站相适应。