Visualizzare il codice html di una pagina web con VB.NET
dic 28
Vi segnalo questa interessante funzione. Ci permette di leggere il codice html di una pagina web.
Function getHtmlCode(ByVal url As String) As String Dim WebRequest As Net.HttpWebRequest Dim WebResponse As Net.WebResponse Dim stream As IO.Stream Dim streamReader As IO.StreamReader Try WebRequest = Net.WebRequest.Create(url) WebRequest.Timeout = 10000 WebResponse = WebRequest.GetResponse stream = WebResponse .GetResponseStream streamReader = New IO.StreamReader(stream) Return streamReader.ReadToEnd Catch ex As Exception MsgBox(ex.ToString) End Try End Function
01:03 on dicembre 29th, 2009
Cacchio . Non sapevo si potesse fare :S
Corro subito a provarla !