public ActionResult SignIn(Customer cust) { if (ModelState.IsValid) { _customer = _strBL.GetCustomerName(cust.customerName); if (_customer != null) { _customer = _strBL.GetCustomerPassword(cust.customerPassword); if (_customer != null) { ViewData["Name"] = cust.customerName; //ViewData["Pass"] = cust.customerPassword; //return View("Menu"); HttpContext.Session.SetString("customerName", _customer.customerName); // for future reference when trying to get session info //string name = HttpContext.Session.GetString("customerName"); HttpContext.Session.SetInt32("customerId", _customer.id); return(View("Menu")); } else { return(Redirect("../Home/Invalid")); } } else { return(Redirect("../Home/Invalid")); } } return(BadRequest("Invalid model state")); }