有没有办法像Ajax一样实时更新ASP页面?(Is there a way to make ASP page update in real time, like Ajax?)

编程入门 行业动态 更新时间:2024-10-28 04:19:24
没有办法像Ajax一样实时更新ASP页面?(Is there a way to make ASP page update in real time, like Ajax?)

有没有办法像Ajax一样实时更新ASP页面?

Is there a way to make ASP page update in real time, like Ajax?

最满意答案

我将向您简要介绍ASP和AJAX,以帮助您了解这两种技术之间的区别。

ASP

ASP是一种服务器端语言。 喜欢它的表兄弟:Python,Ruby,PHP。 它用于在服务器上生成动态内容,然后将其作为HTML传递到客户端的浏览器。 ASP无法实时“更新”任何内容,因为它无法连接到自己的客户端进行更新。 您的ASP服务器的每次更新/响应都必须响应客户端的请求。


AJAX

AJAX代表异步Javascript和XML。 它本身不是一种语言。 这里的语言是Javascript,主要是客户端语言。 AJAX函数由运行在客户端计算机上的javascript向您的服务器发送“特殊”请求(XMLHTTPRequest),并接收响应。 然后,Javascript使用此响应动态更新页面。


也就是说,在开始尝试创建内容之前,您应该先研究Javascript和ASP。 AJAX在某种程度上是一个高级主题。 如前所述http://asp.net/ajax是一个很好的资源。

I'll give you a brief summary of ASP & AJAX to help you understand the difference between these two technologies.

ASP

ASP is a server-side language. Like it's cousins: Python, Ruby, PHP. It is used to generate dynamic content on the server, and then pass it along as HTML to the client's browser. ASP cannot "update" anything in realtime, as it cannot connect to a client of it's own accord to make an update. Each update/response from your ASP server must be in response to a request from the client.


AJAX

AJAX stands for Asynchronous Javascript And XML. It is not a language in and of itself. The language here is Javascript, which is primarily a client-side language. AJAX functions by the javascript running on the client machine sending a "special" request (XMLHTTPRequest) to your server, and receiving a response. Javascript then uses this response to update the page dynamically.


That said, you should study up on both Javascript and ASP before you begin attempting to create something. AJAX is somewhat of an advanced topic. As mentioned previously http://asp.net/ajax is a good resource.

更多推荐

本文发布于:2023-07-27 22:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1296666.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:没有办法   实时   页面   real   Ajax

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!