DLL的弹出控件 [英] Popup control from dll
问题描述
我正在开发一种可以在Web上运行并赢得胜利的框架,所以我有以下接口:
I''m developing a kind of framework that will work in web and win, so I have this interface:
public interface IViewsManager
{
...
void ShowMessage();
...
}
结构如下:
The structure is like the following:
1) UI.Common
a) IViewsManager
2) UI.Win
a) ViewsManagerWin
3) UI.Web
a) ViewsManagerWeb
4) UI.Controls
a) PopupControlWin
b) PopupControlWeb
5) Web Application
从我的Web应用程序中,我调用IViewsManager.ShowMessage,并根据环境调用适当的弹出控件.
我有win的实现,可以从另一个dll调用弹出控件.我的问题是,当我尝试在Web环境中实现它时,我必须从另一个dll调用弹出控件,并且我想显示该弹出窗口并禁用带有灰色层的网页,而且我不知道该如何做.去做.
请,任何帮助将不胜感激.预先感谢.
And from my web application I call the IViewsManager.ShowMessage, and depending on the enviroment it calls the appropiate popup control.
And I have the implementation for win that call a popup control from another dll. My problem is when I try to implement it for web enviroment, I have to call a popup control from another dll, and I would like to show the popup and the web page disables with a gray layer, and I don''t know how to do it.
Please, any help will be appreciated. Thanks in advance.
推荐答案
您面临的问题是,在Web环境中显示弹出窗口不是由.NET代码触发的.它实际上是从javascript触发的,因此您的逻辑将必须在javascript对象的客户端.
如果您想显示一个弹出窗口,那么我建议您需要使用具有许多便捷 ^ ].
The problem that you are facing is that showing a popup window in a web environment is not triggered from .NET code. It''s actually triggered from javascript, so your logic is going to have to be on the client side in a javascript object.
If you want to show a popup, then I''d suggest that you need to look into using jQuery which has many handy popup utilities available[^].
这篇关于DLL的弹出控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!