Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

Get simple address used to access page

Vote:
 

If on a PageType I use the "Simple address for this page", so that I can have two URLs that access the same page. How do I detect in the code behind of a user control on this page which address was used to access the page?

I am looking at implementing a means of turning off pagination for a listing page. I have a page called "Press releases", and added "Press-releases-all" as a Simple address, using this page will turn off the pagination, the idea being to allow users and search engines to view the whole listing without having to have a separate page or query string item on this page.

Thanks

 

#32714
Sep 14, 2009 16:21
Vote:
 

if (Request.RawUrl == CurrentPage.LinkURL)
{
...
}
else
{
...
}

#32717
Edited, Sep 14, 2009 16:45
Vote:
 
Thanks, Request.RawUrl returns what I needed.
#32719
Sep 14, 2009 17:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.