Pass cookie from Web Request to WebBrowser
Suppose you have some domain where you are navigating with a WebRequest object and you need to be able to browser that domain in a standard WebBrowser control, using the same cookies of the WebRequest.
The solution is really simple, you need to use the InternetSetCookieEx Windows API. First of all the import statement
|
|
Now you can use in a simple helper function.
|
|
This technique is really useful if you perform a login with a standard WebRequest object, and then want to browse the site in a webbrowser control using the same login credentials you are using with the WebRequest object.
alk.