1
当我尝试这样做:自定义的ActionResult文件路径
public ActionResult Index(string page)
{
IndexViewModel model = new IndexViewModel();
return ("~/Themes/_Layout.cshtml", model);
}
它给我的错误The name 'model' does not exist in the current context
在第一行@model InnodiaCMS.Models.Controllers.IndexViewModel
但是这一切都正常工作时_Layout.cshtml是在共享文件夹。
但我需要它在主题文件夹!我怎样才能做到这一点?
哦,这是一个很容易解决的mvc问题xD谢谢!并感谢您的链接。 – BjarkeCK 2011-12-15 21:35:29