且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用asp.net在任务栏中显示通知消息

更新时间:2023-09-11 08:14:04

你不能......

ASP.NET应用程序的客户端是一个沙盒网页浏览器内部...您无法访问操作系统的资源(安全原因),因此您无法使用任何Windows API访问任务栏...

您需要的任何通知显示在您的网页内...

(您可能会看到GMail会在任务栏上显示通知,但是有一个单独的应用程序要安装 - 您也可以这样做,但与GMail一样,它不会成为您网页的一部分)
You can't...
The client side of your ASP.NET application is a web page sandboxed inside the browser...You can not access the resources of the OS (security reasons), so you can not use any Windows API to access the taskbar...
Any notification you have you have to display inside your web page...
(You may see that GMail do display notifications on the taskbar, but there is there a separate application to install - you can do it too, but as with GMail, it will not be part of your web page)