views:

246

answers:

1

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!

+1  A: 

Does this help? http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/00a29544-8cf4-4de2-8e7c-e7931b0e2221

Good luck!

Jared
Thanks for the suggestion; unfortunately wb.Document is null to begin with, so I can't always set a cookie and Navigate.
ty