I am trying to download a web page using WebRequest.
The problem is that this page uses cookies. In IE, I can view this page
correctly (since I have the cookie) but when downloading using WebRequest I
don't get the page I want.
How can I add cookie information to my WebRequest ?
How do I know which cookie information the page need ?
A code example will be great.
Here is my code:
Dim szDate As String = ""
Dim NetDataRequest As System.Net.WebR equest =
System.Net.WebR equest.Create(s zUrl)
Dim NetDataResponse As System.Net.WebR esponse = NetDataRequest. GetResponse()
Dim StreamRead As System.IO.Strea mReader
StreamRead = New System.IO.Strea mReader(NetData Response.GetRes ponseStream(),
System.Text.Enc oding.ASCII)
szDate = StreamRead.Read ToEnd()
NetDataResponse .Close()
StreamRead.Clos e()
Return szDate
Thanks for your time
ra***@hotmail.c om