0
string cookie_string = "";
requestss9.CookieContainer = new CookieContainer();

WebRespx1ss9.Cookies = requestss9.CookieContainer.GetCookies(requestss9.RequestUri);

foreach (Cookie cook in WebRespx1ss9.Cookies)
{
    cookie_string += cook.ToString() + ";";
}

webBrowser1.Document.Cookie = cookie_string;
webBrowser1.ScriptErrorsSuppressed = true;
webBrowser1.Navigate(Action, true);

requestss9 = HTTP Web Request;
WebRespx1ss9 = HTTP Web Response;

*问题是webBrowser1.Document.Cookie = cookie_string;返回对象引用未设置为对象实例。如何将其设置为对对象的引用?我试过webBrowser1 = new WebBrowser();但是,它没有用。

4

0 回答 0