Register   |  Login
You are hereHome
 Article Details
How to capture the output of remote server’s webpage response?

 Let’s discuss how to capture remote webpage’s result into our web page. Sometime we might need the remote webpage’s result to be stored in database as well.

Here is the simplest way that I am aware of to achieve this.

  WebRequest request = WebRequest.Create("http://www.google.com");

        request.Method = "GET";

        WebResponse response= request.GetResponse();

        StreamReader reader = new StreamReader(response.GetResponseStream());

        Response.Write(reader.ReadToEnd());

In this example we make a request google.com and capture the output and write into our current page. The same way we can capture and store it into the database as well.

Hope it helps someone on the planet…


Written By: Kumaravel
Date Posted: 1/20/2009
Number of Views: 1112


Comments
lu juan Says:
4/5/2011 5:24:40 PM

My favorite part of the suite is Microsoft Office 2010 . You can use it like a fancy clipboard, but Office 2010 is much more powerful and useful.So, I'm forced to pay for an upgrade to Microsoft Office that I did not want.For the price, you can't go wrong with Outlook 2010 Home & Student. And, I may or may not be able to use the Product Key on the package I purchased to activate only Word, Excel, Microsoft outlook 2010PowerPoint and OneNote, the programs I thought I was buying. The only answer was to go to MS Office, or have everyone else in the world switch to Office 2007 .The instructions on the Microsoft website for activating Office imply that the full Microsoft Office 2007 Professional suite is the only version eligible for proper licensing.



You must be logged in to submit a comment.

Return