P
pmclinn
I have the following asp.net code and I'm looking to see how I would
accomplish this task in the Compact Framework. What would I have to
modify in the following code to make this work in the mobile 5 world?
Any direction would be appreciated. I simply want to pull down a web
page programmatically.
Dim RequestUrl As String = "http://www.yahoo.com"
Dim WebRequestObject As HttpWebRequest
Dim sr As StreamReader
Try
Dim WebResponseObject As HttpWebResponse
WebRequestObject = CType(WebRequest.Create(RequestUrl),
HttpWebRequest)
WebRequestObject.Method = "GET"
WebResponseObject = CType(WebRequestObject.GetResponse(),
HttpWebResponse)
sr = New StreamReader(WebResponseObject.GetResponseStream)
Dim Results As String = sr.ReadToEnd
sr.Close()
Console.Out.WriteLine(Results)
Try
WebResponseObject.Close()
WebRequestObject.Abort()
Catch
End Try
Catch
End Try
accomplish this task in the Compact Framework. What would I have to
modify in the following code to make this work in the mobile 5 world?
Any direction would be appreciated. I simply want to pull down a web
page programmatically.
Dim RequestUrl As String = "http://www.yahoo.com"
Dim WebRequestObject As HttpWebRequest
Dim sr As StreamReader
Try
Dim WebResponseObject As HttpWebResponse
WebRequestObject = CType(WebRequest.Create(RequestUrl),
HttpWebRequest)
WebRequestObject.Method = "GET"
WebResponseObject = CType(WebRequestObject.GetResponse(),
HttpWebResponse)
sr = New StreamReader(WebResponseObject.GetResponseStream)
Dim Results As String = sr.ReadToEnd
sr.Close()
Console.Out.WriteLine(Results)
Try
WebResponseObject.Close()
WebRequestObject.Abort()
Catch
End Try
Catch
End Try