1

I dont have any background in ASP.

So I need to access page 1, 2 and so on from the following link address http://www.itftennis.com/beachtennis/rankings/rankings-full-lists/men.aspx

I tried to use /men.aspx?page=2 and nothing happened. Also, when I copied the link address from button of page 2 I get this javascript:__doPostBack('ctl00$ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentContainerCentre$BaselineContainerCentre$playerrankings_6$grdBeachTennisRankings','Page$2')

The expected solution is /men.aspx?page=n or similar.

Is there any way to find URL path for each page from above link address?

Vikas Sardana
  • 1,593
  • 2
  • 18
  • 37
hbbz040
  • 184
  • 1
  • 1
  • 16
  • men.aspx is already a page? what do you mean accessing page? Is there is any for query string in code behind? – Imad Feb 07 '17 at 04:49
  • @Imad I mean accessing subpath from [link] (http://www.itftennis.com/beachtennis/rankings/rankings-full-lists/men.aspx). Yes, there is a query string in code behind. – hbbz040 Feb 07 '17 at 04:57
  • What's your expected output and current one? Nothing happen after putting page=2 means? – Imad Feb 07 '17 at 04:58
  • 1
    This page using pagination based on `VIEWSTATE`, `VIEWSTATE`using HTTP POST method. So for you question, there have no way. but you can simulator the HTTP POST to change page to 2. – Johan Shen Feb 07 '17 at 04:59
  • Expected output should be http://www.itftennis.com/beachtennis/rankings/rankings-full-lists/men.aspx?page=2. however, it is not working. But, if I use the browser and click on button 2, the webpage will be refresh and bring the new data. The goal is to obtain the url for page 2. Is there anyway to do that? – hbbz040 Feb 07 '17 at 05:09
  • @JohanShen I gonna try to use HTTP POST – hbbz040 Feb 07 '17 at 05:15
  • @hbbz040 did you post these data? if you using `WebHttpRequest`, you need post data named '__EVENTTARGET', '__EVENTARGUMENT', '__VIEWSTATE' and '__VIEWSTATEGENERATOR' etc. they are in page html code, you need got them and post them to request other page. – Johan Shen Feb 07 '17 at 05:23
  • Posted you request code better. then we can know how way do you request the page. – Johan Shen Feb 07 '17 at 05:25
  • @JohanShen ok... thanks – hbbz040 Feb 07 '17 at 05:40

1 Answers1

0

I see you have tagged javascript. In JS, you can use

window.location('link to your successive pages')

or

window.location.href('link to your successive pages')

Look at this answer for more clarification. Hope this helps.

Community
  • 1
  • 1
Anan Srivastava
  • 112
  • 1
  • 9