一个HttpModule可以调用一个新的IE弹出窗口? [英] Can an HttpModule invoke a new IE pop-up window?
问题描述
我开发一个自定义应用程序的反馈工具。我们的想法是,当用户启动一个特定的应用程序,我希望有一个弹出出现,说一对夫妇秒用户启动应用程序,询问他们是否会愿意提供反馈后。弹出将只是一个新的IE窗口。因此,在功能上类似于:
I am developing a custom application feedback tool. The idea is that when the user launches a particular application, I want a pop-up to appear, say a couple seconds after the user launches the application, that asks if they'd be willing to provide feedback. The pop-up will simply be a new IE window. So, something similar in functionality to:
Response.Write("<script>window.open('" + sUrl + "', 'mywindow','resizable= yes,scrollbars= yes');</script>");
我们已经在我们公司的许多Web应用程序(ASP.NET),我认为最快的解决方法是删除一个的HttpModule
到应用程序的解决方案。对于理想的示例,请参阅: http://www.foreseeresults.com/
We have numerous web apps (ASP.NET) in our company, and I think the quickest solution would be to drop an HttpModule
into the application's solution. For an ideal example, see: http://www.foreseeresults.com/.
问:是调用一个新的互联网浏览器弹出窗口可能与的HttpModule
?或者,也许是调用JavaScript中的的HttpModule
可能在客户端浏览器?
QUESTION: Is invoking a new internet browser pop-up possible with an HttpModule
? Or is perhaps invoking JavaScript from an HttpModule
possible on the client's browser?
推荐答案
您可以通过使用ASP.NET HTTP响应滤波器实现这一目标。
You can achieve this by using ASP.NET HTTP Response Filters.
您实现您的自定义过滤器,然后设置一个自定义里面的HttpModule
或通过处理 PostReleaseRequestState $ C处的Global.asax文件中$ C>事件。
You implement your custom filter and then set it inside a custom HttpModule
or inside a Global.asax file by handling the PostReleaseRequestState
event.
·贝娄是HTTP响应滤波器的文章由斯科特·米切尔。
Bellow is an article by Scott Mitchel on HTTP Response Filters.
http://www.4guysfromrolla.com/articles/120308-1.aspx
本文包含两个简单响应滤波器,这应该给你如何实现你的情况下,正确的方向。我建议你使用jQuery来显示一个模式对话框并显示一条消息。当用户确认对话框打开新窗口一个新的网页(这样你还可以避开弹出窗口拦截器)。
This article contains two simple response filters, which should give you the right direction on how to implement your case. I suggest you to display a modal dialog using jQuery and display a message. When user confirms that dialog open a new web page in new window (this way you'll also get around popup blockers).
希望这有助于!
问候,
乌罗什
Regards, Uros
这篇关于一个HttpModule可以调用一个新的IE弹出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!