"Models.LoginViewModel" is a type that is not valid in this context
3 answers
change code
@sample.Models.LoginViewModel
and
@model sample.Models.LoginViewModel
those.
@model sample.Models.LoginViewModel
@{
if(Session["users"] != null)
{
string user = Session["users"].ToString();
}
}
@{
ViewBag.Title = "Home Page";
}
Keyword @model should be at the beginning of u, just specifying only the model name
+4
source to share