public PageLocation(ForumPage page, string url) { this.Page = page; this.Url = url; }
public void SetCurrentPage(ForumPage page) { if (HttpContext.Current != null) { PageLocation current = new PageLocation(ForumPage.Default, Settings.StartPageAbsolutePath); if (HttpContext.Current.Session[this.SessionKeys.CurrentPageLocation] != null) current = (PageLocation)HttpContext.Current.Session[this.SessionKeys.CurrentPageLocation]; PageLocation previous = (PageLocation)current.Clone(); if (previous.Page != page) HttpContext.Current.Session[this.SessionKeys.PreviousPageLocation] = previous; current = new PageLocation(page, HttpContext.Current.Request.GetUrlRewriter().AbsoluteUri); HttpContext.Current.Session[this.SessionKeys.CurrentPageLocation] = current; } }