开发者

C# wininet InternetSetOption

I'm using How to clear System.Windows.Forms.WebBrowser session data? and it works as long as there is only one browser. Is it possible to give 2 web browser controls within the same application their own session?

If so, would I just need to change

InternetSetOption(IntPtr.Zero, INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0);

to

InternetSetOption(webBrowser1.Handle, INTERNET_OPTION_END_BROW开发者_JAVA技巧SER_SESSION, IntPtr.Zero, 0);

?

Or is something else required?


Have you tried it yet? I don't think it's possible because the session is stored per browser instance. Maybe you need to clear the data from the session that belongs to that control, then you can keep session data of the other control.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜