RIG000
شنبه 27 مهر 1392, 13:03 عصر
این ارور
The view 'loginPost' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/loginPost.aspx
~/Views/Home/loginPost.ascx
~/Views/Shared/loginPost.aspx
~/Views/Shared/loginPost.ascx
~/Views/Home/loginPost.cshtml
~/Views/Home/loginPost.vbhtml
~/Views/Shared/loginPost.cshtml
~/Views/Shared/loginPost.vbhtml
واین کد لاگین که وقتی اطلاعات درست میفرستی کار میکنه ... و به صفحه اصلی برمیگرده اما وقتی یوزر و پس اشتباه میزنی این ارور رو میده ...!!!
[HttpPost]
public ActionResult loginPost(Models.SetLogin user)
{
if (ModelState.IsValid)
{
Models.ToranjEntities db = new Models.ToranjEntities();
var query= (from f in db.tblUser
where f.UserName==user.UserName && f.Password==user.Password
select f.UserName).SingleOrDefault();
if (query==null)
{
ModelState.AddModelError("", "نام کاربری و پسورد درست نمی باشد");
//return View();
}
else
{
FormsAuthentication.SetAuthCookie(user.UserName,us er.RememberMe);
return RedirectToAction("MainView","Home");
}
}
return View(user);
}
The view 'loginPost' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Home/loginPost.aspx
~/Views/Home/loginPost.ascx
~/Views/Shared/loginPost.aspx
~/Views/Shared/loginPost.ascx
~/Views/Home/loginPost.cshtml
~/Views/Home/loginPost.vbhtml
~/Views/Shared/loginPost.cshtml
~/Views/Shared/loginPost.vbhtml
واین کد لاگین که وقتی اطلاعات درست میفرستی کار میکنه ... و به صفحه اصلی برمیگرده اما وقتی یوزر و پس اشتباه میزنی این ارور رو میده ...!!!
[HttpPost]
public ActionResult loginPost(Models.SetLogin user)
{
if (ModelState.IsValid)
{
Models.ToranjEntities db = new Models.ToranjEntities();
var query= (from f in db.tblUser
where f.UserName==user.UserName && f.Password==user.Password
select f.UserName).SingleOrDefault();
if (query==null)
{
ModelState.AddModelError("", "نام کاربری و پسورد درست نمی باشد");
//return View();
}
else
{
FormsAuthentication.SetAuthCookie(user.UserName,us er.RememberMe);
return RedirectToAction("MainView","Home");
}
}
return View(user);
}