I would like the VB.net WebClient to remember cookies.
I have searched and tried numerous overloads classes.
I want to login to a website via POST, then POST to another page and get its contents whilst still retaining my session.
Is this possible with VB.net without using WebBrowser control ?
I tried Chilkat.HTTP and it works, but I want to use .Net libraries.
Create a new class the inherits from WebClient that stores the CookieContainer like @Guffa says. Here’s code that I use that does that and also keeps the referer alive:
Here’s the C# version of the above code: