ASPAlliance.com : The #1 Active Server Pages .NET Community The #1 ASP.NET Community
Search   Search

Subscribe   Subscribe

Powered by ORCSWeb Hosting


Site Stats


Powered By ASP.NET
 
Featured Sponsor

Featured Columnist


Featured Book
.NET Enterprise Design with Visual Basic .NET and SQL Server 2000
.NET Enterprise Design with Visual Basic .NET and SQL Server 2000

Find Prices
Sample Chapter


New! asp.netPRO

We publish our articles in the standard RSS format.

Powerful .NET Email Component

Code Sharing Software
WebClient.aspx.vb by Damian Manifold
  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.objectByVal 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
WebClient.aspx.vbGenerated using CodeView
 Copyright © 2000-2003 ASPAlliance.com  Page Rendered at 11/21/2009 6:25:00 PM