Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
Not Getting Data Nullable Exception
Yogesh Vedpathak
Jan 12 2018 5:20 AM
141
Reply
public ActionResult Logout(UserProfile objUser)
{
{
if (ModelState.IsValid)
{
using (SessionEntities Db = new SessionEntities())
{
var obj = Db.UserProfiles.Where(a => a.UserName.Equals(objUser.UserName) && a.Password.Equals(objUser.Password)).FirstOrDefault();
if (obj != null)
{
Session["UserName"] = objUser.UserName.ToString();
// Session["UserName"] = obj.UserName.ToString();
// Session.Remove(a.ToString());
Session.Abandon();
return RedirectToAction("Login");
}
else
{
return RedirectToAction("Admin");
}
}
}
}
return RedirectToAction("UserDashBoard");
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
Encoding issue while generating PDF with help of NRECO
Changes the each bars colors from barchart using mvc