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
Pure C#
Pure C#

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 Webclient2
  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         Dim q as new System.Collections.Specialized.NameValueCollection()
  10 
  11         q.Add("text", "test text")
  12         q.Add("password", "secret")
  13         q.Add("checkbox", "on")
  14         q.Add("textarea", "a longer text sentence")
  15         q.Add("submit", "submit")
  16 
  17         wc.QueryString = q
  18 
  19         s = wc.OpenRead("http://authors.aspalliance.com/damianm/article/4/2/formreader.aspx")
  20 
  21         'read in the page
  22         sr = new System.IO.StreamReader(s)
  23         Literal1.Text = sr.ReadToEnd()
  24 
  25         '--tidy up
  26         sr.Close()
  27         s.Close()
  28     End Sub
  29 
  30 End class
WebClient.aspx.vbGenerated using CodeView
 Copyright © 2000-2003 ASPAlliance.com  Page Rendered at 11/21/2009 6:30:59 PM