整个页面可以在asp.net 3.5中用ajax开发吗?

时间:2022-12-23 02:01:12

My requirement is to develop a page with 4 sections, which cannot have a postback. Section 1. Content which can be changed on user click Section 2. List of users viewing the page online (Auto update when user leaves or visits the page ) Section 3. Chat for the users online Section 4. Rating the content and other functionality for Section 1

我的要求是开发一个包含4个部分的页面,这些页面不能有回发。第1部分用户点击可以更改的内容第2部分在线查看页面的用户列表(用户离开或访问页面时自动更新)第3部分在线聊天用户第4章评估内容和其他功能第1节

Please advise me how to go about it ? Also let me know if there are other easy options in this scenario. One of the options considered was GWT, dropped due to the fact that entire application is being developed in .nET

请告诉我如何去做?如果此方案中还有其他简单选项,请告诉我。考虑的选项之一是GWT,因为整个应用程序是在.nET中开发的

Any help regarding this will be highly appreciated. Freelancers willing to work on this will be highly rewarded.

任何有关这方面的帮助将受到高度赞赏。愿意为此工作的*职业者将获得高额奖励。

2 个解决方案

#1


1  

It depends how you define the term "postback". Of course, you could design a whole application without a single postback, I'm not sure exactly how useful it would be unless it was for word processing or something.

这取决于您如何定义术语“回发”。当然,你可以设计一个没有单一回发的整个应用程序,我不确定它有多么有用,除非它是用于文字处理或其他东西。

Some people have commented that using the UpdatePanel is okay - well...that's not really without postbacks. An UpdatePanel posts the whole page back in the background, the ASP.NET webserver processes the entire page using the full page lifecycle, so it's not strictly no-postback.

有些人评论说使用UpdatePanel是可以的 - 好吧......那不是没有回发。 UpdatePanel将整个页面发布回后台,ASP.NET Web服务器使用整个页面生命周期处理整个页面,因此它不是严格的无回发。

I've got an application that I wrote that has no postbacks (if by no postbacks you mean, no visible full page refreshes) that communicates with the server using a number of UpdatePanels for each section of the page. You can also use the JavaScript XmlHttpObject to write your own AJAX calls to the server - once again, strictly speaking, this is still a postback it just doesn't visibly update the entire page in the user's browser. If you're using the JavaScript XmlHttpObject, it's fairly simple to make webservice calls.

我有一个我写的应用程序没有回发(如果没有回复你的意思,没有可见的整页刷新),它使用一些UpdatePanels为服务器与页面的每个部分进行通信。您还可以使用JavaScript XmlHttpObject将自己的AJAX调用写入服务器 - 严格来说,这仍然是一个回发,它只是不会在用户的浏览器中明显更新整个页面。如果您使用的是JavaScript XmlHttpObject,那么进行Web服务调用相当简单。

Some good reading for this is:

对此的一些好的解读是:

#2


1  

Yes, this is entirely possible using MS Ajax.

是的,这完全可以使用MS Ajax。

Check out this book, which describes how to write entire web applications without using any postbacks:

查看本书,其中介绍了如何在不使用任何回发的情况下编写整个Web应用程序:

http://www.amazon.com/Developing-Service-Oriented-Applications-Microsoft%C2%AE-PRO-Developer/dp/0735625913/ref=sr_1_9?ie=UTF8&s=books&qid=1229457728&sr=8-9

#1


1  

It depends how you define the term "postback". Of course, you could design a whole application without a single postback, I'm not sure exactly how useful it would be unless it was for word processing or something.

这取决于您如何定义术语“回发”。当然,你可以设计一个没有单一回发的整个应用程序,我不确定它有多么有用,除非它是用于文字处理或其他东西。

Some people have commented that using the UpdatePanel is okay - well...that's not really without postbacks. An UpdatePanel posts the whole page back in the background, the ASP.NET webserver processes the entire page using the full page lifecycle, so it's not strictly no-postback.

有些人评论说使用UpdatePanel是可以的 - 好吧......那不是没有回发。 UpdatePanel将整个页面发布回后台,ASP.NET Web服务器使用整个页面生命周期处理整个页面,因此它不是严格的无回发。

I've got an application that I wrote that has no postbacks (if by no postbacks you mean, no visible full page refreshes) that communicates with the server using a number of UpdatePanels for each section of the page. You can also use the JavaScript XmlHttpObject to write your own AJAX calls to the server - once again, strictly speaking, this is still a postback it just doesn't visibly update the entire page in the user's browser. If you're using the JavaScript XmlHttpObject, it's fairly simple to make webservice calls.

我有一个我写的应用程序没有回发(如果没有回复你的意思,没有可见的整页刷新),它使用一些UpdatePanels为服务器与页面的每个部分进行通信。您还可以使用JavaScript XmlHttpObject将自己的AJAX调用写入服务器 - 严格来说,这仍然是一个回发,它只是不会在用户的浏览器中明显更新整个页面。如果您使用的是JavaScript XmlHttpObject,那么进行Web服务调用相当简单。

Some good reading for this is:

对此的一些好的解读是:

#2


1  

Yes, this is entirely possible using MS Ajax.

是的,这完全可以使用MS Ajax。

Check out this book, which describes how to write entire web applications without using any postbacks:

查看本书,其中介绍了如何在不使用任何回发的情况下编写整个Web应用程序:

http://www.amazon.com/Developing-Service-Oriented-Applications-Microsoft%C2%AE-PRO-Developer/dp/0735625913/ref=sr_1_9?ie=UTF8&s=books&qid=1229457728&sr=8-9