.NET Setting a cookie in a WebBrowser control

Posted by ty on Stack Overflow See other posts from Stack Overflow or by ty
Published on 2010-05-13T21:55:52Z Indexed on 2010/05/13 23:44 UTC
Read the original article Hit count: 388

Filed under:
|
|
|

I am loading a website using a WebBrowser's Navigate function, and I want the browser to load the page with a cookie I've given it.

The following code doesn't work:

        wb.Navigate(url, null, null, "Cookie: " + cookie + "\n");

What am I doing wrong? Will I have to use InternetSetCookie? This doesn't seem like the best solution.

Thanks!

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET