How can I get PageLink to the current page if I need it in the custom control within a composer block. If I use CurrentPage (member of PropertyDataControl that is my base class for the custom control), I get PageData that refers to the composer element, not to the page.
Asked
Active
Viewed 676 times
1 Answers
1
Ok, I managed to find a solution. In case somebody was facing the same problem, here's the way to go:
protected PageData CurrentParentPage
{
get
{
var currentParentPage = PageReference.ParseUrl(Page.Request.UrlReferrer.AbsoluteUri);
if(!PageReference.IsNullOrEmpty(currentParentPage))
{
return currentParentPage.GetPageFromReference();
}
return null;
}
}
This should be put int the control class

Dave
- 349
- 1
- 15