<div class="dp-highlighter nogutter"> <div class="bar">its not converting correctly it shows error to convert c#: error is: -- line 30 col 1: EOF expected</div> <div class="bar">http://www.developerfusion.com/tools/convert/vb-to-csharp/ </div>
Imports System.IO
Imports System.Net
PartialClass Default1
Inherits System.Web.UI.Page
ProtectedSub Page_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Load
maddyrafi897...
Member
134 Points
300 Posts
Re: try to help
Apr 30, 2012 05:44 AM|LINK
- Imports System.IO
- Imports System.Net
- Partial Class Default1
- Inherits System.Web.UI.Page
-
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- Dim strURL As String
- Dim strResult As String
- Dim wbrq As HttpWebRequest
- Dim wbrs As HttpWebResponse
- Dim sr As StreamReader
-
- ' Set the URL (and add any querystring values)
- strURL = "http://aspnetlibrary.com/articles.aspx?Page=1"
-
- ' Create the web request
- wbrq = WebRequest.Create(strURL)
- wbrq.Method = "GET"
-
- ' Read the returned data
- wbrs = wbrq.GetResponse
- sr = New StreamReader(wbrs.GetResponseStream)
- strResult = sr.ReadToEnd.Trim
- sr.Close()
-
- ' Write the returned data out to the page
- TextBox1.Text = strResult
- End Sub
- End Class
</div>