public ActionResult UserProfile() { if (Session["user"] == null) { return(RedirectToAction("Index")); } string name = Session["user"].ToString(); string[] details = blayer_ob.DisplayProfile(name); ViewBag.firstname = details[0]; ViewBag.lastname = details[1]; ViewBag.password = details[2]; ViewBag.email = details[3]; ViewBag.phoneno = details[4]; return(View()); }