Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
hi guys
 
I want to get data from another website web page, but that web page contain a grid with paging, when i get data from that page it only give me the 1 index data. but i want to get the all page inedx data so is there any way to get data from that site or any way to change the pagindex (means click on the another page index)
 
thanks
Posted 3-Jan-13 0:57am
Comments
Marcus Kramer at 3-Jan-13 17:20pm
   
So you want to steal the data from another site...
If the owner of that data would like for you to have access to that data, then they would provide you an API or web service or such for you to access the data. Scraping data from another site is basically stealing when you come right down to it.
Sergey Alexandrovich Kryukov at 3-Jan-13 17:55pm
   
You are right, but it does not have to be a steal. Hope it won't be. So, I answered, but of course credited your comment — please see.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Of course, you can do it on server side. As you use ASP.NET, all .NET FCL is at your service. In this case, you need to use the class System.Net.HttpWebRequest. In some simplified cases, you can use the class System.Net.WebClient:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx[^].
 
Actually, what you try to achieve requires use of the techniques of Web scraping. Please see:
http://en.wikipedia.org/wiki/Web_scraping[^].
 
You can find further detail in my past answers:
get specific data from web page[^],
How to get the data from another site[^].
 
Please take into account what Marcus Kramer told you in hist comment to the question. Smile | :)
 
Good luck,
—SA
  Permalink  
v2
Comments
Espen Harlinn at 3-Jan-13 18:50pm
   
5'ed!
Sergey Alexandrovich Kryukov at 3-Jan-13 19:00pm
   
Thank you, Espen.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The only way you can do that, if it's an external site, is to look at the URL to see if you can pass the page index that way, or somehow automate a program that simulates browsing, via a web browser control.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 420
1 CHill60 410
2 Sergey Alexandrovich Kryukov 384
3 PIEBALDconsult 235
4 BillWoodruff 190


Advertise | Privacy | Mobile
Web02 | 2.8.141015.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100