Can gridview paging be set to generate urls instead of postbacks?

Discussion in 'ASP .Net' started by John Mott, Aug 11, 2007.

  1. John Mott

    John Mott Guest

    Hi All,

    I recently read a post that said that google and other spiders are unable to
    navigate paging in the GridView control because it uses postbacks and it
    can't determine the url.

    I've verified that it doesn't see portions of my site that are on page 2 and
    beyond according to whats generated. This is not a good thing if your want
    people to find your stuff.

    The gridview as it is is so sweet I don't want to give it up. Before
    devolving into custom paging is there an option that would have the page
    numbers generate urls that a spider could follow instead of calls into the
    postback?

    Thanks,

    John
     
    John Mott, Aug 11, 2007
    #1
    1. Advertising

  2. Hello

    Recently I have been involved in a thread where we discussed this, you
    have some options:

    - Implement custom paging (there you can swap to links):
    http://www.codeproject.com/useritems/CustomPaging.asp

    - Leave the URL issue and generate a sitemap for google (a txt with the
    list of all URL's could be a good start), check out google sitemaps.

    - There is some trick when you build up the page, check if it's google bot
    and change the page size to 1000:

    if (Request.ServerVariables["HTTP_USER_AGENT"] == "Googlebot") {
    GridView1.PageSize = 1000;
    } else {
    GridView1.PageSize = 10;
    }

    Good luck
    Braulio


    /// ------------------------------
    /// Braulio Diez
    ///
    /// http://www.tipsdotnet.com
    /// ------------------------------




    "John Mott" wrote:

    > Hi All,
    >
    > I recently read a post that said that google and other spiders are unable to
    > navigate paging in the GridView control because it uses postbacks and it
    > can't determine the url.
    >
    > I've verified that it doesn't see portions of my site that are on page 2 and
    > beyond according to whats generated. This is not a good thing if your want
    > people to find your stuff.
    >
    > The gridview as it is is so sweet I don't want to give it up. Before
    > devolving into custom paging is there an option that would have the page
    > numbers generate urls that a spider could follow instead of calls into the
    > postback?
    >
    > Thanks,
    >
    > John
    >
    >
    >
     
    =?Utf-8?B?QnJhdWxpbyBEaWV6?=, Aug 11, 2007
    #2
    1. Advertising

  3. John Mott

    John Mott Guest

    Thanks Braulio,

    I decided to take a third route -- hijack the page row and put in links with
    url's in it. I don't have large datasets so i'm not worried about
    performance and I'm nervous about the other options.

    I created a demo for this:

    http://www.nicecleanexample.com/ViewApp.aspx?TID=gridviewnavmod

    Like everythign in programming there isn't one right way, just options that
    may be useful in certain circumstances..

    John
    nice clean examples at www.nicecleanexamples.com



    "Braulio Diez" <> wrote in message
    news:...
    > Hello
    >
    > Recently I have been involved in a thread where we discussed this, you
    > have some options:
    >
    > - Implement custom paging (there you can swap to links):
    > http://www.codeproject.com/useritems/CustomPaging.asp
    >
    > - Leave the URL issue and generate a sitemap for google (a txt with the
    > list of all URL's could be a good start), check out google sitemaps.
    >
    > - There is some trick when you build up the page, check if it's google
    > bot
    > and change the page size to 1000:
    >
    > if (Request.ServerVariables["HTTP_USER_AGENT"] == "Googlebot") {
    > GridView1.PageSize = 1000;
    > } else {
    > GridView1.PageSize = 10;
    > }
    >
    > Good luck
    > Braulio
    >
    >
    > /// ------------------------------
    > /// Braulio Diez
    > ///
    > /// http://www.tipsdotnet.com
    > /// ------------------------------
    >
    >
    >
    >
    > "John Mott" wrote:
    >
    >> Hi All,
    >>
    >> I recently read a post that said that google and other spiders are unable
    >> to
    >> navigate paging in the GridView control because it uses postbacks and it
    >> can't determine the url.
    >>
    >> I've verified that it doesn't see portions of my site that are on page 2
    >> and
    >> beyond according to whats generated. This is not a good thing if your
    >> want
    >> people to find your stuff.
    >>
    >> The gridview as it is is so sweet I don't want to give it up. Before
    >> devolving into custom paging is there an option that would have the page
    >> numbers generate urls that a spider could follow instead of calls into
    >> the
    >> postback?
    >>
    >> Thanks,
    >>
    >> John
    >>
    >>
    >>
     
    John Mott, Aug 11, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kaidi
    Replies:
    5
    Views:
    475
    Andrew Thompson
    Jan 4, 2004
  2. Replies:
    0
    Views:
    444
  3. Nathan Sokalski

    Converting Relative URLs into Absolute URLs

    Nathan Sokalski, Aug 11, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    747
    Sriram Srivatsan
    Aug 12, 2008
  4. Adam Monsen

    JDBC URLs ...not really URLs?

    Adam Monsen, Feb 6, 2009, in forum: Java
    Replies:
    11
    Views:
    6,218
    Adam Monsen
    Feb 8, 2009
  5. Steve T.

    dynamic URLS convert to static URLS for search engines

    Steve T., Mar 1, 2004, in forum: ASP .Net Web Services
    Replies:
    7
    Views:
    293
    Steve T.
    Mar 4, 2004
Loading...

Share This Page