插入新数据时弹出Windows ASP.Net [英] Popup Windows ASP.Net when new data inserted

查看:54
本文介绍了插入新数据时弹出Windows ASP.Net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想当东西,

当我的数据库(MySQL)中收到新数据时,如何显示带有ASP.Net的PopUp窗口.在我的页面中,我将其设置为每5秒刷新一次.
我该怎么办?

非常感谢

更新:如果有人知道如何在添加新数据时更好地通知我,请告诉我. (通知应包含添加的值数据)

Hi,

I wanna as something,

How do I show PopUp window with ASP.Net when new data received in my database (MySQL). In my page, I set it to refresh every 5 seconds.
How do I do that?

Many thanks

Update : If anyone know how to do better to notify me when new data added, please tell me. (The notify should consist the value data added)

推荐答案



我认为可以使用SqlDependency解决此问题.
请点击链接:
http://www.dreamincode.net/forums/topic /156991-using-sqldependency-to-monitor-sql-database-changes/ [ http://wdevs.blogspot.in/2011/10/notify- database-changes-to-aspnet-pages.html [ ^ ]
使用SqlDependency进行数据更改事件 [
Hi,

I think this problem can be solved using SqlDependency.
Please follow the link:
http://www.dreamincode.net/forums/topic/156991-using-sqldependency-to-monitor-sql-database-changes/[^]
http://wdevs.blogspot.in/2011/10/notify-database-changes-to-aspnet-pages.html[^]
Using SqlDependency for data change events[^]

This may help you.
All the best.
-AK


您需要在代码中添加以下命名空间:

System.Windows.Form;
//它会在您的ASP中包含Form app的所有控件.网路应用程式.

现在,当您单击添加数据"(无论您使用的是什么名称)时,请将以下代码写在您的代码下方:

you need to add this namespace in your code:

System.Windows.Form;
// it will include all the controls of form app in your asp. net app.

now when you click on Add Data(whatever name you''ve taken), write this code below your code:

MessageBox.Show(here your value var+" added succesfully");


希望这会帮助你.谢谢


Hope this will help you. Thanks


这篇关于插入新数据时弹出Windows ASP.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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