[Help] HttpWebRequest problem
Hello
I am trying to run this code but everytime i got this error
Code:
Public Sub Command1_Click()
Dim fr As System.Net.HttpWebRequest
Dim targetURI As New Uri("http://whatever.you.want.to.get/file.html")
fr = DirectCast(HttpWebRequest.Create(targetURI), System.Net.HttpWebRequest)
If (fr.GetResponse().ContentLength > 0) Then
Dim str As New System.IO.StreamReader(fr.GetResponse().GetResponseStream())
Response.Write (str.ReadToEnd())
str.Close();
End If
MsgBox (targetURI)
End Sub
Error
Code:
user defined type not defined
Searched on Internet but didnt got the solution. What problem i am getting ?
Thanks
1 Attachment(s)
Re: [Help] HttpWebRequest problem
First of all, this is the wrong section to be posting this.
Second of all, what are you exactly trying to do? Read the source of a webpage? If so, you want to do the following...
Lastly, MSDN is your friend, learn to use it. Hope this helps.
Reference: http://msdn.microsoft.com/en-us/library/456dfw4f.aspx