Getting a Page from a Guid


Here’s just a quick little code-hint. Sometimes it can be handy to retrieve a pagereference or a pagedata object from a guid. And it’s easily done using the PermanentLinkMapStore.

See here:

 PermanentPageLinkMap map = PermanentLinkMapStore.Find(PageGuid) as PermanentPageLinkMap;
 return  (map != null) ? map.PageReference : PageReference.EmptyReference;

Post Comments()

You might also like

You might also like