본문 바로가기

.NET/MVC.NET

View에서 Controller에 프로퍼티 엑세스


view.cshtml에서 


아래와 같이 


controller를 엑세스할 수 있다.



 var baseController = this.ViewContext.Controller as Web.Controllers.BaseController;