向网站中的所有用户显示通知消息 [英] Show notification message to all users in website

查看:88
本文介绍了向网站中的所有用户显示通知消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

海,

在我的网站上,有10位成员登录.如果添加或编辑一个成员值,则这些更改通知应作为标签发送给所有登录用户通知.就像脸书一样,当用户留下有关一个人的评论时,该消息将显示给适当的用户.我需要同样的动作.

Hai,

In my website 10 members are logged in. If any one members is add or edit the value those changes notification should be send notification to all logged in users as a label. Same like face book, when user leaves the comments about one person the message will be display to appropriate user. same action i need. how to do?

推荐答案

如果您拥有母版页,那么这将非常有效地完成任务....

您可以在页面中使用计时器控件

If u r having a masterpage then this will be very effective to do the task....

u can have a timer control in page

<asp:Timer ID="Timer1" runat="server" Interval="15000">
                                      </asp:Timer>





然后您可以使用此计时器触发页面的一部分







and later u can trigger a section of a page with this timer



<asp:UpdatePanel ID="UpdatePanel6" runat="server" UpdateMode="Always">
                                                                   <ContentTemplate>

                                                 <b>U can put ur method over here to do the work.................</b>
                                                                   </ContentTemplate>
                                                                   <Triggers>
                                                                       <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
                                                                   </Triggers>
                                                               </asp:UpdatePanel>


检查此博客
http://retkomma.wordpress .com/2009/08/05/server-to-client-notification-using-asp-net-and-comet-approach/ [
check this blog
http://retkomma.wordpress.com/2009/08/05/server-to-client-notification-using-asp-net-and-comet-approach/[^]
--NDK


使用计时器,您可以每30秒对页面进行一次部分更新. jQuery对于部分更新可能有用.
By using a timer, you can do a partial update of your page say every 30 seconds. jquery might be useful for partial update.


这篇关于向网站中的所有用户显示通知消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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