我的代碼是:「Models.LoginViewModel」是一種類型,這是不是在給定的情況下有效
@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.
請給任何想法來解決我的問題。
究竟是什麼你想在這裏做什麼?該語法不清楚。指定更多細節。 –
嘗試@model sample.Models.LoginViewModel – Sachu