Re: httpwebrequest and cookies

Tech-Archive recommends: Fix windows errors by optimizing your registry



"taz" <taz@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb:
i am trying to use HttpWebRequest to get the HTML of a webpage on a site.
problem is that the page is hidden behind a username-password login screen
which sets a cookie when the user has successfully logged. so, how can i get
the HTML of the required page via HttpWebRequest ? ive tried using
CookieContainer and SetCookies but im not sure im using them properly.

Take a look at the two code samples:

<URL:http://dotnet.mvps.org/dotnet/code/net/#CookieRequest>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

.