This is a migrated thread and some comments may be shown as answers.

[Solved] problem with EnableSEOPaging with UseRouting and anchor links

3 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Web
Top achievements
Rank 1
Web asked on 28 Jan 2013, 10:07 PM
I'm using a rad grid with EnableSEOPaging with UseRouting. It work great but the problem is that I need to maintain the anchor link.
For example

/BrowseProducts/BUILDW/?#BUILDING-MATERIALS

should go to
/BrowseProducts/BUILDW/2?#BUILDING-MATERIALS

but goes to:

/BrowseProducts/BUILDW/2

Any suggestions?

Thanks

3 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 31 Jan 2013, 12:22 PM
Hello Web,

Could you please elaborate a bit more on your scenario? Where the hyperlink is placed on your page (is it into the RadGrid items or somewhere else)? How the navigate url of this hyperlink is generated? Also it will be helpful if you could post your aspx page markup code with the related code behind file and the routing code. Thus we will be able to gather more details about your scenario and provide you with more to-the-point answer.

Looking forward for your reply.

All the best,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Web
Top achievements
Rank 1
answered on 09 Apr 2013, 04:47 PM
Thank you.
I think I didn't explain very well.

The user will land on a page and the URL is :
/BrowseProducts/BUILDW/?#BUILDING-MATERIALS

from there I have a radgrid with pages using EnableSEOPaging with UseRouting

  <PagerStyle EnableSEOPaging="True" UseRouting="true" SEORouteName="Browse Products Pages"
        SEOPageIndexRouteParameterName="gridpage"></PagerStyle>

the routing code:

routes.MapPageRoute("Browse Products Pages", "BrowseProducts/{category}/{gridpage}", "~/BrowseProducts/Default.aspx", true, new RouteValueDictionary { { "gridpage", "1" } });



when the user changes the page using the standard page navigation of the grid the following url loads:

/BrowseProducts/BUILDW/2

which works great, but i would it to go to:
/BrowseProducts/BUILDW/2?#BUILDING-MATERIALS


Thank you
0
Radoslav
Telerik team
answered on 12 Apr 2013, 08:18 AM
Hello Web,

Unfortunately the desired functionality is not supported. You can add as additional parameter the query string parameter by using following signature:
/{gridpage}/{*queryvalues}

Or additional static string with:
{gridpage}/{*n}

More information about the ASP.NET Routing you can find here:
http://msdn.microsoft.com/en-us/library/cc668201(v=vs.90).aspx
http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx
http://msdn.microsoft.com/en-us/library/cc668177.aspx

I hope this helps.

Regards,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Web
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Web
Top achievements
Rank 1
Share this question
or