Try our conversational search powered by Generative AI!
AI OnAI Off
You can use PageRouteHelper
var pageRouteHelper = ServiceLocator.Current.GetInstance<PageRouteHelper>(); var pageTypeName = pageRouteHelper.Page.PageTypeName;
How to get Page type name from the current block View (CSHTML file), if the block is placed in the content area of a page