.net asp.net razor Razor Web Pages - Accessing the WebPage instance Dec 9, 2011 See the question and my original answer on StackOverflow Are you looking for WebPageContext.Current.Page ?