| 1 | public class Webclient6 |
| 2 | Inherits System.Web.UI.Page |
| 3 | protected WithEvents Literal1 as System.Web.UI.WebControls.Literal |
| 4 | |
| 5 | private Sub Page_Load(ByVal sender as System.object, ByVal e as System.EventArgs) Handles MyBase.Load |
| 6 | Dim wc as new System.Net.WebClient() |
| 7 | Dim s as System.IO.Stream |
| 8 | Dim sr as System.IO.StreamReader |
| 9 | |
| 10 | s = wc.OpenRead("http://authors.aspalliance.com/damianm") |
| 11 | |
| 12 | 'read in the page |
| 13 | sr = new System.IO.StreamReader(s) |
| 14 | Literal1.Text = sr.ReadToEnd() |
| 15 | |
| 16 | '--tidy up |
| 17 | sr.Close() |
| 18 | s.Close() |
| 19 | End Sub |
| 20 | |
| 21 | End class |