如何在asp.net中向用户显示弹出消息 [英] how to show pop up message to user in asp.net

查看:98
本文介绍了如何在asp.net中向用户显示弹出消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个项目中,我必须向特定用户显示弹出消息,这是一个

用户1:药房用户
每当该用户准备(购买医疗物品)并单击保存"按钮时.详细信息将保存在数据库中.
保存后,

用户2:医疗商店用户

通知必须弹出给该用户.
该用户位于(在应用程序中)该通知的哪个页面,都应向该用户显示通知.

授予权利和购买物品没有问题
给我asp.net中的解决方案

希望大家都理解

I am working in a project where i have to show a popup message to a particular user that is

user 1 : pharmacy user
whenever this user prepares (purchase medical items) and clicks on save button. the details are saved in the database.
after saving,

user 2: medical store user

the notification has to be popup to this user.
whichever page this user in (in the application) the notification should be shown to that user).

NO problems in giving rights and purchasing items
give me solution in asp.net

I hope you all understand

推荐答案

那是什么问题.
对于1:如果保存了数据,请注册一个开始脚本,并可以在javascript中放置一个javascript函数来显示消息.

同样,您也可以根据自己的要求处理第二种情况.
So what is the problem.
For 1: Register a startscript if the data is saved and in startscript you can put a javascript function to show the message.

Similarly you can do for second case based on your requirement.


最简单的方法是

1.创建一个javascript函数以从数据库中获取异步数据(可能正在使用http请求),并检查是否有任何新的采购订单.
2.在特定的时间间隔内运行此功能.
3.如果有任何新订单,请创建一个弹出窗口并显示新订单.
4.在此订单弹出表单中,单击接受"按钮.
5.单击接受"按钮,将那些新订单"更新为显示的订单".

尽管还有其他方法可以做到这一点,但这是最简单的方法.
The easiest way to do this is like

1. Create a javascript function to fetch async data (may be using http request) from your database and check if there is any new purchase order.
2. Run this function in a specific time interval.
3. If there is any new orders create a pop window and show the new orders.
4. In this order popup form put Accept button.
5. On click on the Accept button update those "new orders" to "shown orders".

Although there are other ways to show a do this but this will be the easiest way.


您唯一的解决方案是进行恒定的AJAX调用以标识当前用户(或只是进行检查)在每个页面的基类中,如果可以等到它们更改页面之后,再从最初存储它的数据库中获取要显示的消息.
Your only solution would be to make constant AJAX calls to identify the current user ( or just do a check in a base class for every page, if you can wait until they change pages ), and then get the message to show from the database, where it''s initially stored.


这篇关于如何在asp.net中向用户显示弹出消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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