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
Professional C# Web Services: Building .NET Web Services with ASP.NET and .NET Remoting
Professional C# Web Services: Building .NET Web Services with ASP.NET and .NET Remoting

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 Webclient
  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://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 7:04:37 PM