Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load other web page in ASP.NET

Tags:

c#

asp.net

I want to load some fixed part from other website to my web application. How to accomplish this? Thanks.

like image 853
Jayant Bramhankar Avatar asked Jan 30 '11 08:01

Jayant Bramhankar


1 Answers

You could do it in a few ways:

  1. On the client side, load the content into an <iframe>
  2. On the client side, load the content using ajax and write it into the page.
  3. On the server side, load the page using WebClient DownloadString and write it into your page.

Update

After you get your string, you might parse it and grab the stuff you want using the Html Agility Pack . (Also available on Nuget)

like image 68
Gideon Avatar answered Oct 07 '22 03:10

Gideon