c#中webbrowser向浏览器添加cookie的方法
[DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]\r\npublic static extern bool InternetSetCookie(string lpszUrlName, string lbszCookieName, string lpszCookieData);\r\n \r\nprivate void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)\r\n{\r\n InternetSetCookie(e.Url.ToString(), "key", "value");\r\n}