Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populating a datagrid from a text file saved on a different web site

Status
Not open for further replies.

sicohne

Technical User
Jun 30, 2003
51
GB
I am trying to get a datagrid on my webform to be populated from a website which is basically a text file (i.e.
I tried:
Code:
 Username = "name"
Password = "pswd"
myWebRequest = WebRequest.Create("[URL unfurl="true"]www.aaa.com/bbb.txt")[/URL]
myProxy = CType(myWebRequest.Proxy, WebProxy)
myProxy.Credentials = New NetworkCredential(Username, Password)
myStream = myClient.OpenRead("[URL unfurl="true"]www.aaa.com/bbb.txt")[/URL]
sr = New StreamReader(myStream)
Dim line As String
fileText = sr.ReadToEnd
sr.Close()
' then a regular expression to put everything in the correct column
but it claims "the underlying connection was closed". I think the problem lies with the proxy settings, but I can not figure out what (it works fine as a windows form)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top