1
내가이 수행하려고 :사용자 정의 ActionResult 파일 경로
public ActionResult Index(string page)
{
IndexViewModel model = new IndexViewModel();
return ("~/Themes/_Layout.cshtml", model);
}
그것은 첫 번째 줄 @model InnodiaCMS.Models.Controllers.IndexViewModel
에 나에게 오류 The name 'model' does not exist in the current context
를 제공을하지만 _Layout.cshtml 공유 폴더에있을 때 모든 것이 잘 작동 .
하지만 테마 폴더에 있어야합니다. 내가 어떻게 할 수 있니?
오, 근사하게도 mvc에서 문제가 해결하기 쉽습니다. xD 감사합니다! 그리고 링크도 감사드립니다. – BjarkeCK