如何发送通知消息 [英] how to send notification messages

查看:65
本文介绍了如何发送通知消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请让我知道实现以下方案所需的步骤:
我必须为用户1和用户2创建一个具有两个登录ID的应用程序...现在,当用户1登录时,他为用户2输入消息,用户2将收到此消息作为通知消息.用户2不能直接回复用户1,但可以键入并发送另一条通知消息给用户2,该消息将在用户1侧以弹出形式显示....

Kindly let me know steps required to achieve the following scenario:
I have to create a application with two login IDs for user1 and user2... now when user1 logs in he types a message for user2 and user2 will receive this message as a notification message. User2 cannot directly reply back to user1 but can type and send another notification message to user2 which will appear as a popup in user1 side....

推荐答案

假设:
1)用户1和用户2正在使用连接到SQL Server数据库的ASP.NET Web应用程序.

步骤:
1)在存储已发送消息的数据库中创建一个表.该表应包含一个默认值为0的接收位字段.

2)该应用程序具有用于向目标用户发送消息到数据库的表单.

2)使用ajax,应用程序可以使用存储过程按您选择的时间间隔(每30秒或您想要的时间)检查数据库中是否有其他用户发送的尚未收到的消息(仍然为0). />
3)存储过程会将接收到的位设置为1,并将消息返回给应用程序.

4)如果返回消息,则ajax将生成一个弹出窗口以显示消息.

祝你好运!
Assumptions:
1) User 1 and user 2 are using an ASP.NET web application connected to an SQL Server database.

Steps:
1) Create a table in the database where sent messages are stored. The table should include a recieved bit field with a 0 default.

2) The application has a form used to send messages to the database for the intended user.

2) Using ajax, the application can use a stored procedure to check the database at intervals of your choosing (every 30 seconds or what ever you want) for messages sent by the other user that have not been recieved (still 0).

3) The stored procedure will set the received bit to 1 and return the messages to the application.

4) If messages are returned, the ajax will generate a popup to display them.

Good luck!


这篇关于如何发送通知消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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