Take the 2-minute tour ×

I need a web sites some data which I want to parse via jquery. I am able to do everything except the pagination which contain javascript anchor link.

<a href="javascript:__doPostBack('grdResults$ctl29$ctl01','')">2</a>

I want to load the second page (certain selector, say "p #listo") in a paragraph in the 1st page via ajax. Can I do this via ajax? if it is possible, please can you share the code..

Thanks in advance..

I want to get the 2nd page via ajax...I tried a lot things....

    url: __doPostBack('grdResults$ctl29$ctl01',''),
    success: function(data){
    //Some function I will perform

But it reload the page...if I use quotation for url it give error... I tried get, load, post but unable to do it...

share|improve this question
Short answer: jQuery doesn't do this for you, you have to do it for yourself. Your question is macro; try breaking down the question / functionality into abstract portions such as displaying page numbers, calculating which items to display per page, fetching the desired results, etc, and then ask questions on those issues instead of trying to have the community write the entire code module –  Authman Apatira Apr 18 '12 at 17:34
if jquery unable to do it what should I use??? –  Shakil Apr 18 '12 at 17:51
Your server side code. –  Jason Foglia Apr 18 '12 at 17:51

1 Answer 1

up vote 0 down vote accepted

You need to have a URL that outputs data and handles pagination on the server side. For example, it could be /mydata/page/3/, and it would grab page 3 of the data and return it in some format (JSON, XML, YAML, whatever).

Then, you can have jQuery send an ajax request on click of each of the items in the pagination controller instead of running __doPostBack().

Switching to ASP.NET MVC would help you.

share|improve this answer

Your Answer


