本文介绍了C#windows form-在另一个windows webbrowser中打开链接(新窗口(新exe)而不是新标签)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在另一个Windows(新窗口(New Exe)而不是New Tab)中打开链接,其中用户已经登录并保留cookie和其他详细信息并让用户登录以便用户不必重新输入他/她的凭证。

我已在下面的链接中提到,

[]

在NewTab中工作正常,但在新窗口中没有(New Exe )

你能告诉我任何解决方案。

谢谢



我尝试过:



我在下面的链接中提到过,

[]

I wanted to know how can I open link in another Windows(New Window(New Exe) instead of New Tab)where user is already logged-in and persist the cookies and other details and keep the user logged-in so that the user does not have to re-type his/her credentials.
I have reffered below link,
Extended .NET 2.0 WebBrowser Control[^]
That working fine in NewTab, but not in New Window(New Exe)
Can you please suggest me any solutions.
Thanks

What I have tried:

I have reffered below link,
Extended .NET 2.0 WebBrowser Control[^]

推荐答案

WebBrowser1.Navigate(Uri, true);

或者:

Or this:

WebBrowser1.Navigate(url.SettingsValue, "_blank", post, headers);

url。 SettingsValue:你的网址地址

_ blank:新空白

帖子(您的选择):您的令牌或密码

标题(您的选择) ):表示他ader like => 授权:基本+ auth +\\\\ n;



见: []

url.SettingsValue : your url address
"_blank" : for new blank
post (your choice) : your token or password
headers (your choice) : token header like => "Authorization: Basic " + auth + "\r\n";

see: How to open a URL in new window using WebBrowser control in c# Windows Forms application and read its header information (via regex etc) - Stack Overflow[^]


这篇关于C#windows form-在另一个windows webbrowser中打开链接(新窗口(新exe)而不是新标签)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 20:35