471,862 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,862 software developers and data experts.

webresponse in VB,NET


I have developed one application in VB.NET which extracts
the source code of Web pages.I gave a bunch of URLs in a
listbox while at the time of response from the web it was
struckup.Sometimes it gives output but sometimes it was
struckup,i don't know the reason why it was strucked.
If u know please let me know.Here it my source code.
Public Function GetSource(ByVal url As String) As String
Dim strURL As String
Dim fsoStream As Scripting.TextStream
Dim mFso As New Scripting.FileSystemObject
Dim s, s1, str1 As String

Dim Source As New System.Text.StringBuilder

Dim WebResponse As Net.WebResponse =
Dim StreamReader As New IO.StreamReader

Source.Append(StreamReader.ReadLine() + vbCrLf)
Loop Until StreamReader.ReadLine() Is Nothing


'Return Source.ToString()
TextBox2.Text = Source.ToString()

fsoStream = mFso.OpenTextFile
(Application.StartupPath & "\example.txt",

fsoStream = Nothing

End Function

Nov 21 '05 #1
0 3017

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Jonathan | last post: by
2 posts views Thread by trialproduct2004 | last post: by
3 posts views Thread by trialproduct2004 | last post: by
2 posts views Thread by Jeff G. | last post: by
reply views Thread by archana | last post: by
4 posts views Thread by CindyH | last post: by
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.