Loading a local html file and get cookies

Bauhaus

Member
Joined
May 11, 2008
Messages
12
Programming Experience
Beginner
I have a local html file with some javascript in it that automatically submits the form in the html file when I doubleclick the file.
Now, what I want to do in VB.NET:

1) Load & execute the local html file.
2) Get the cookies once the form is submitted and redirects you to a specific url.
3) Go to another page on the same site while still being logged in.

Since its a local file, I can't use (http)webrequest. And I don't want to use a webbrowser control since it's not my intention to show the page.

So what would be the best approach ?
 
Hello.

I'm note quiet sure, but shouldn't you be able to point the httpwebrequest at a local file? Like "file:///C:/Temp/yourHTML.html"?

Bobby
Thanks for your reply Robert.

The file:/// works for webrequest (not httpwebrequest), but unfortunately webrequest doesnt support a cookiecontainer.
So is it possible to use webrequest with cookies in some way ?
 
Back
Top