public ActionResult EditProfile(string id) { if (id != Session["user"].ToString()) { return(Json("You can't edit other's profile!", JsonRequestBehavior.AllowGet)); } Profile profilePage = new Profile(); profilePage = dalLayer.LoadProfile(id); return(View(profilePage)); }