我的代码是:@sample.Models.LoginViewModel @{string user = Session["users"].ToString(); } @{ViewBag.Title = "Home Page"; }我收到错误:‘@sample.Models.LoginViewModel’ is a type, which is not valid in the given context. 请提出任何解决我的问题的想法.解决方法:改变代码@sample.Models.LoginViewModel如@model sample.Models.LoginViewModel即是@model sample.Models.LoginViewModel@{if(Session["users"] != nul...