Hi, I'm a young italian Asp.Net programmer! I have a problem with this piece of code, that pulls a web page from www.w3schools.com and writes it in my webpage. The Asp.Net code is:
Dim Richiesta As WebRequest = WebRequest.Create("http://www.w3schools.com/xhtml/default.asp")
Dim Risposta As WebResponse = Richiesta.GetResponse()
Dim DatiInput As Stream = Risposta.GetResponseStream()
Dim FlussoDati As StreamReader = New StreamReader(DatiInput)
Dim Html As String = FlussoDati.ReadToEnd()
FlussoDati.Close()
Response.Write(Html)
But, for some strange reasons, the only html I can get on my page is:
XHTML Tutorial
I noticed that after the "body" tag there are three "new line" characters...
but I can't manage to find a solution! Thanks to all for future replies! Alessandro
ripe
Member
10 Points
2 Posts
Problem maybe with streams
Apr 04, 2004 09:41 AM|LINK
Dim Richiesta As WebRequest = WebRequest.Create("http://www.w3schools.com/xhtml/default.asp") Dim Risposta As WebResponse = Richiesta.GetResponse() Dim DatiInput As Stream = Risposta.GetResponseStream() Dim FlussoDati As StreamReader = New StreamReader(DatiInput) Dim Html As String = FlussoDati.ReadToEnd() FlussoDati.Close() Response.Write(Html)But, for some strange reasons, the only html I can get on my page is: I noticed that after the "body" tag there are three "new line" characters... but I can't manage to find a solution! Thanks to all for future replies! Alessandroripe
Member
10 Points
2 Posts
Re: Problem maybe with streams
Apr 04, 2004 03:55 PM|LINK