How to Handle Many Page Links in a Search?
How to Handle Many Page Links in a Search?
am 25.09.2007 16:54:36 von vunet.us
Search results on my site started to show a large number of page
links. I never had to deal with it before but it is time now. I am
trying to come up with a good logic / idea how to display a large
number of page links without showing all of them at once.
For example, if user is searching for "pets" and gets 50 pages back, I
want to show 10-20 page links and hide the rest. Also, the closer user
gets to the last visible pages, the more hidden page links become
visible. Something like Google does...
If somebody worked with it before, could you share with ideas, or
suggestions, or good examples to look at? Is there a standard way to
implement this, perhaps?
Thanks.
Re: How to Handle Many Page Links in a Search?
am 25.09.2007 17:30:52 von Jon Paal
This is commonly referred to as "paging"
google for examples:
paging asp -.net
"VUNETdotUS" wrote in message news:1190732076.472494.99090@d55g2000hsg.googlegroups.com...
> Search results on my site started to show a large number of page
> links. I never had to deal with it before but it is time now. I am
> trying to come up with a good logic / idea how to display a large
> number of page links without showing all of them at once.
> For example, if user is searching for "pets" and gets 50 pages back, I
> want to show 10-20 page links and hide the rest. Also, the closer user
> gets to the last visible pages, the more hidden page links become
> visible. Something like Google does...
> If somebody worked with it before, could you share with ideas, or
> suggestions, or good examples to look at? Is there a standard way to
> implement this, perhaps?
> Thanks.
>
Re: How to Handle Many Page Links in a Search?
am 25.09.2007 17:47:14 von reb01501
VUNETdotUS wrote:
> Search results on my site started to show a large number of page
> links. I never had to deal with it before but it is time now. I am
> trying to come up with a good logic / idea how to display a large
> number of page links without showing all of them at once.
> For example, if user is searching for "pets" and gets 50 pages back, I
> want to show 10-20 page links and hide the rest. Also, the closer user
> gets to the last visible pages, the more hidden page links become
> visible. Something like Google does...
> If somebody worked with it before, could you share with ideas, or
> suggestions, or good examples to look at? Is there a standard way to
> implement this, perhaps?
> Thanks.
Does this help?
http://www.aspfaq.com/show.asp?id=2120
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: How to Handle Many Page Links in a Search?
am 26.09.2007 17:25:57 von vunet.us
On Sep 25, 11:47 am, "Bob Barrows [MVP]"
wrote:
> VUNETdotUS wrote:
> > Search results on my site started to show a large number of page
> > links. I never had to deal with it before but it is time now. I am
> > trying to come up with a good logic / idea how to display a large
> > number of page links without showing all of them at once.
> > For example, if user is searching for "pets" and gets 50 pages back, I
> > want to show 10-20 page links and hide the rest. Also, the closer user
> > gets to the last visible pages, the more hidden page links become
> > visible. Something like Google does...
> > If somebody worked with it before, could you share with ideas, or
> > suggestions, or good examples to look at? Is there a standard way to
> > implement this, perhaps?
> > Thanks.
>
> Does this help?http://www.aspfaq.com/show.asp?id=2120
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
I am not sure where exactly is the code sample on that page. I think
it shows paging only, not hidden page links...
Thanks.
Re: How to Handle Many Page Links in a Search?
am 26.09.2007 17:42:25 von reb01501
VUNETdotUS wrote:
> On Sep 25, 11:47 am, "Bob Barrows [MVP]"
> wrote:
>> VUNETdotUS wrote:
>>> Search results on my site started to show a large number of page
>>> links. I never had to deal with it before but it is time now. I am
>>> trying to come up with a good logic / idea how to display a large
>>> number of page links without showing all of them at once.
>>> For example, if user is searching for "pets" and gets 50 pages
>>> back, I want to show 10-20 page links and hide the rest. Also, the
>>> closer user gets to the last visible pages, the more hidden page
>>> links become visible. Something like Google does...
>>> If somebody worked with it before, could you share with ideas, or
>>> suggestions, or good examples to look at? Is there a standard way to
>>> implement this, perhaps?
>>> Thanks.
>>
>> Does this help?http://www.aspfaq.com/show.asp?id=2120
>
> I am not sure where exactly is the code sample on that page. I think
> it shows paging only, not hidden page links...
> Thanks.
"hidden"??
Oh! You want to send ALL the links to the client and hide/unhide them in
response to user actions? You should post this to a client-side
scripting group - it has nothing to do with asp. Try
microsoft.public.scripting.jscript
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Re: How to Handle Many Page Links in a Search?
am 26.09.2007 18:23:44 von vunet.us
On Sep 26, 11:42 am, "Bob Barrows [MVP]"
wrote:
> VUNETdotUS wrote:
> > On Sep 25, 11:47 am, "Bob Barrows [MVP]"
> > wrote:
> >> VUNETdotUS wrote:
> >>> Search results on my site started to show a large number of page
> >>> links. I never had to deal with it before but it is time now. I am
> >>> trying to come up with a good logic / idea how to display a large
> >>> number of page links without showing all of them at once.
> >>> For example, if user is searching for "pets" and gets 50 pages
> >>> back, I want to show 10-20 page links and hide the rest. Also, the
> >>> closer user gets to the last visible pages, the more hidden page
> >>> links become visible. Something like Google does...
> >>> If somebody worked with it before, could you share with ideas, or
> >>> suggestions, or good examples to look at? Is there a standard way to
> >>> implement this, perhaps?
> >>> Thanks.
>
> >> Does this help?http://www.aspfaq.com/show.asp?id=2120
>
> > I am not sure where exactly is the code sample on that page. I think
> > it shows paging only, not hidden page links...
> > Thanks.
>
> "hidden"??
>
> Oh! You want to send ALL the links to the client and hide/unhide them in
> response to user actions? You should post this to a client-side
> scripting group - it has nothing to do with asp. Try
> microsoft.public.scripting.jscript
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
"Hidden" may not be a correct word. I thought it is better to do it on
aserver side with ASP since it handles my paging.
Simply, if you look at Google, searching the word "ASP", hit 50th page
and you'll find that it shows the range of pages from 40 to 60,
leaving 50th page in the middle.
That's kind of what I need.
Thanks
Re: How to Handle Many Page Links in a Search?
am 26.09.2007 18:40:50 von reb01501
VUNETdotUS wrote:
> "Hidden" may not be a correct word. I thought it is better to do it on
> aserver side with ASP since it handles my paging.
> Simply, if you look at Google, searching the word "ASP", hit 50th page
> and you'll find that it shows the range of pages from 40 to 60,
> leaving 50th page in the middle.
> That's kind of what I need.
> Thanks
You've got a list of links, right? So you only want to send a subset
(page) of those links to Response with each Request, right? So, the
first step is to decide how you are going to store that list of links
between page requests: database, text file, session variable ...
The links also need a sortable ID so they can be grouped into pages.
Then you need to create a mechanism to allow the user to select which
page of links he wants to see. Perhaps a series of links with the start
# of the page included in the querystring the way Google does it.
Then you need to write the serverside code to read the start # from the
querystring, extract the corresponding page from the stored list of
links and write it to Request.
As Jon says, there's zillions of examples of doing this available via
Google.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.