服务器可以启动客户端页面更新吗? [英] Can server initiate update of client pages ?

查看:62
本文介绍了服务器可以启动客户端页面更新吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是ASP.NET的新手,直到现在只写了简单的经典网站。


但是 - 时间到了,现在我需要它:


1.服务器将监听对于本地机器上的某些事件

2.根据收到的事件(例如 - 事件ID),它将更新需要基于此ID更新的客户端页面(如果当前存在有趣的客户端)具体的ID)。


这种网站的好例子 - 机场航班信息,当客户选择一些特定的航班,并希望看到自动更新显示的信息而不推动[更新"按钮(或客户端发送更新请求的计时器)。


我的问题是:


1.我可以使用哪种ASP.NET机制用来实现上面的东西?

2.如果可以,可以在基于UNIX的Internet服务器上发布这样的WEB站点吗?

3.可以从基于UNIX的浏览器看到它吗? br />

谢谢,


Zvi

Hi,
I am a newby in ASP.NET, and till now wrote only simple "classic" WEB-sites.

But - the time came, and now I need that:

1. Server will "listen" for some events on its local machine
2. According to event received (say - event ID), it will update client pages, that need updating based on this ID (if currently there exist clients that are interesting in specific ID).

The good example of such site - airport flight information, when client selects some specific flight(s), and want to see automatic updates of displayed information withOUT pushing on "UPDATE" button (or timer at client side that sends update requests).

My questions are:

1. What ASP.NET mechanism can I use to implement above thing ?
2. If this is possible, can such WEB-site be published on UNIX-based Internet Server ?
3. Can it be seen from UNIX-based browser ?

Thanks,

Zvi

推荐答案

客户端控件与文本框一样,将需要AutoPostBack。并再次访问服务器以获取所请求的信息。


ASP.NET本身无法在* nix服务器上运行。存在一些变通方法。如果你搜索这个组,但它并不是真的推荐。


浏览器应该是无关紧要的,但是大多数ASP.NET站点要求客户端的浏览器支持javascript。

-

Curt Christianson

所有者/首席开发人员,DF-Software

网站: http://www.Darkfalz.com

博客: http://blog.Darkfalz.com

" Zvi Danovich" < zv*@cmt.co.il>在留言新闻中写道:%2 **************** @ tk2msftngp13.phx.gbl ...



我是ASP.NET的新手,直到现在只写了简单的经典。网站。


但是 - 时间到了,现在我需要它:


1.服务器将监听对于本地机器上的某些事件

2.根据收到的事件(例如 - 事件ID),它将更新需要基于此ID更新的客户端页面(如果当前存在有趣的客户端)具体的ID)。


这种网站的好例子 - 机场航班信息,当客户选择一些特定的航班,并希望看到自动更新显示的信息而不推动[更新"按钮(或客户端发送更新请求的计时器)。


我的问题是:


1.我可以使用哪种ASP.NET机制用来实现上面的东西?

2.如果可以,可以在基于UNIX的Internet服务器上发布这样的WEB站点吗?

3.可以从基于UNIX的浏览器看到它吗? br />

谢谢,


Zvi
the clientside controls, like the textbox, will have to "AutoPostBack" and make another trip to the server to get the requested information.

ASP.NET can not natively be run on a *nix server. There are some "workarounds" if you search this group but it''s not really recommended.

The browser SHOULD be irrelevant but most ASP.NET sites require that javascript be supported on the client''s browser.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Zvi Danovich" <zv*@cmt.co.il> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi,
I am a newby in ASP.NET, and till now wrote only simple "classic" WEB-sites.

But - the time came, and now I need that:

1. Server will "listen" for some events on its local machine
2. According to event received (say - event ID), it will update client pages, that need updating based on this ID (if currently there exist clients that are interesting in specific ID).

The good example of such site - airport flight information, when client selects some specific flight(s), and want to see automatic updates of displayed information withOUT pushing on "UPDATE" button (or timer at client side that sends update requests).

My questions are:

1. What ASP.NET mechanism can I use to implement above thing ?
2. If this is possible, can such WEB-site be published on UNIX-based Internet Server ?
3. Can it be seen from UNIX-based browser ?

Thanks,

Zvi


亲爱的Curt,


正如我看到AutoPostBack属性的描述 -

使用AutoPostBack属性指定每当用户修改TextBox控件中的文本然后再自动回发到服务器选项卡不受控制。注意仅在内容更改后文本框失去焦点时才会发生回发。

- 当控件失去焦点时,它会导致更新。但是,在我看来,这不是我想要的!


让我再问一次,我需要什么:


1.用户选择更新类型的ID - (例如,航班号) - 并将其发送(提交)到服务器。服务器保存所有提交的ID,并可以通过客户端识别它们(可能是IP地址?)。

2.用户将浏览器窗口移动到屏幕角落,并与其他应用程序一起使用。

3.服务器具有一般消息循环(可能吗?),以及何时它接收具有特定ID的消息,它检查是否有客户端,这个ID很有意思。如果找到此类客户端,则服务器会更新其页面。对于同一个客户端,它可能会发生很多次 - 因此,用户将看到多次自动更新的窗口。


以上处理可能吗?

谢谢,


Zvi


" Curt_C [MVP]" < software_AT_darkfalz.com>在消息新闻中写道:O4 ************** @ tk2msftngp13.phx.gbl ...

客户端控件,如文本框,将必须的AutoPostBack"并再次访问服务器以获取所请求的信息。


ASP.NET本身无法在* nix服务器上运行。存在一些变通方法。如果你搜索这个组,但它并不是真的推荐。


浏览器应该是无关紧要的,但是大多数ASP.NET站点要求客户端的浏览器支持javascript。

-

Curt Christianson

所有者/首席开发人员,DF-Software

网站: http://www.Darkfalz.com

博客: http://blog.Darkfalz.com

" Zvi Danovich" < zv*@cmt.co.il>在留言新闻中写道:%2 **************** @ tk2msftngp13.phx.gbl ...



我是ASP.NET的新手,直到现在只写了简单的经典。网站。


但是 - 时间到了,现在我需要它:


1.服务器将监听对于本地机器上的某些事件

2.根据收到的事件(例如 - 事件ID),它将更新需要基于此ID更新的客户端页面(如果当前存在有趣的客户端)具体的ID)。


这种网站的好例子 - 机场航班信息,当客户选择一些特定的航班,并希望看到自动更新显示的信息而不推动[更新"按钮(或客户端发送更新请求的计时器)。


我的问题是:


1.我可以使用哪种ASP.NET机制用来实现上面的东西?

2.如果可以,可以在基于UNIX的Internet服务器上发布这样的WEB站点吗?

3.可以从基于UNIX的浏览器看到它吗? br />

谢谢,


Zvi
Dear Curt,

As I see the description of AutoPostBack property -
Use the AutoPostBack property to specify whether an automatic postback to the server will occur whenever the user modifies the text in the TextBox control and then tabs out of the control. Note Postback only occurs when the text box loses focus after the contents are changed.
- it causes update when the control loses focus. But, to my opinion, this is NOT what I want !

Let me ask once more, what I need:

1. User selects ID of update type - (say, flight number) - and sends (submits) it to server. The server saves all submitted IDs and can identify them with clients (may be, by IP address ?).
2. User moves the browser window to the screen corner, and works with other applications.
3. Server has general message loop (is it possible ?), and when it receives message with specific ID, it checks, if there are clients, that are interesting with this ID. If such clients are found, server updates their pages. It can occur many times for the same client - so, the user will see the window that is updated many time by itself.

Is above processing possible ?

Thanks,

Zvi

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message news:O4**************@tk2msftngp13.phx.gbl...
the clientside controls, like the textbox, will have to "AutoPostBack" and make another trip to the server to get the requested information.

ASP.NET can not natively be run on a *nix server. There are some "workarounds" if you search this group but it''s not really recommended.

The browser SHOULD be irrelevant but most ASP.NET sites require that javascript be supported on the client''s browser.
--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Zvi Danovich" <zv*@cmt.co.il> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Hi,
I am a newby in ASP.NET, and till now wrote only simple "classic" WEB-sites.

But - the time came, and now I need that:

1. Server will "listen" for some events on its local machine
2. According to event received (say - event ID), it will update client pages, that need updating based on this ID (if currently there exist clients that are interesting in specific ID).

The good example of such site - airport flight information, when client selects some specific flight(s), and want to see automatic updates of displayed information withOUT pushing on "UPDATE" button (or timer at client side that sends update requests).

My questions are:

1. What ASP.NET mechanism can I use to implement above thing ?
2. If this is possible, can such WEB-site be published on UNIX-based Internet Server ?
3. Can it be seen from UNIX-based browser ?

Thanks,

Zvi


> 1。我可以用什么ASP.NET机制来实现上面的东西?


将以下内容放在页面的HTML标题中:

< META HTTP- EQUIV =" REFRESH" CONTENT =" 5"


它将强制页面每5秒刷新一次。
>1. What ASP.NET mechanism can I use to implement above thing ?

Place the following in your page''s HTML header:
<META HTTP-EQUIV="REFRESH" CONTENT="5">

It will force the page to refresh itself every 5 seconds.
2。如果可以,可以在基于UNIX的
Internet服务器上发布这样的WEB站点吗?


以上内容适用于任何Web服务器,因为它是原始HTML。但是,

ASP.NET只能在Windows平台上运行。

3.可以从基于UNIX的浏览器中看到它吗?
2. If this is possible, can such WEB-site be published on UNIX-based Internet Server ?

The above will work in any web server because it is raw HTML. However,
ASP.NET is designed to run only on the Windows platform.
3. Can it be seen from UNIX-based browser ?



浏览器无关紧要。



The browser is irrelevant.


这篇关于服务器可以启动客户端页面更新吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆