web浏览器弹出窗口失去会话 [英] webBrowser popup window loses session

查看:205
本文介绍了web浏览器弹出窗口失去会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用.NET的WebBrowser控件登录到网站。当我点击一个按钮,弹窗的新窗口弹出窗口要求我重新登录。但是我没有要求重新登录,如果我打开Internet Explorer中的网页。有没有什么办法让WebBrowser控件存储会话,这样我就不必在弹出的窗口中重新登录。

I am using WebBrowser control of .NET to login into a website. When i click on a button that popups a new window the popup window asks me to login again. However i am not asked to login again if i open the webpage in internet explorer. Is there any way to make the WebBrowser control store session so that i do not have to login again on the popup window.

推荐答案

要保持你的的会话状态可以的使用 NewWindow2 事件,打开在应用程序的另一种形式的新页;该事件由 web浏览器控制触发。

To maintain the session state you can use the NewWindow2 event to open the new page in another form in the application; the event is triggered by the WebBrowser control.

请参阅如何使用 web浏览器控制NewWindow2事件在Visual C#

See How to use the WebBrowser control NewWindow2 event in Visual C#

这篇关于web浏览器弹出窗口失去会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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