2017年8月7日 星期一

How to get Umbraco current page id in View

How to get Umbraco current page id in View

Environment
- Umbraco version 7.6.3 assembly: 1.0.6361.21154
- VS2015


Value = @UmbracoContext.Current.PageId


Put the page id value in hidden tag for post back purpose
@Html.HiddenFor(m => m.currentPageId, new { Value = @UmbracoContext.Current.PageId })

沒有留言:

張貼留言