Home
About
Contact
Login
Home
Code and Articles
Videos
Books
Search
Demos
Portfolio
Feedback
Home
>
Categories
>
Code from a Category
Salesforce CRM (4)
VB.Net (85)
Zoho Campaigns (1)
Zoho Invoice (1)
MSSQL (230)
Asp.net C# / VB (342)
SugarCRM (1)
CSS (11)
PHP (120)
Google (2)
jQuery (18)
C++ (1)
Zoho Support (1)
Zoho Creator (7)
Zoho Mail (3)
Zoho CRM (63)
Other (16)
DotNetNuke (2)
How to retrieve a webpage using ASP.NET 2.0 and VB .NET
User Name:
codelecturer
Name:
Mike Chauhan
Contact Me:
www.datawebcoder.com/ContactUs.aspx
Home Page:
www.datawebcoder.com
6 years of total IT experience including programming, application development, System Maintenance . 3 years of Experienced and expertise in .Net Framework VB, Visual Basic.Net, ASP.Net 2.0, 3.5 and AD...
[More]
Viewed Times:
2352
Add Date:
11/18/2012
This tutorial will show you how to retrieve an external webpage using the .NET System.Net class, ASP.NET 2.0 and VB.NET
The .NET Framework offers a number of types that makes accessing resources on the network easy.
To display an external webpage we will need to use the System.IO, System.Net, and System.Text namespaces.
We'll put our code in the Page_Load() event.
When the Page_Load() event fires it instantiates a new WebRequest object with the URL that we wish to retrieve. We then execute the GetResponse() method of this new object which returns a WebResponse object. After this is complete it is simply a matter of executing the GetResponseStream() method of the WebResponse object and reading the stream that is returned.
The front end .aspx page looks something like this:
The flow for the code behind page is as follows:
Happy Programming!!!
Reply above Post
Related Posts
ASP.NET-How to Show The Second Level Of Menu Items
How we can make a request to a web page and retrieve the resulting HTML
How to Retrieve Scalar Data from a Stored Procedure
How do you know how many times have downloaded your file
How to Bind GridView using SQLDataSource in ASP.Net
Post a Comment
Name:
(Optional)
Email:
(Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Yes
No
Details**:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.