[OutputCache(VaryByParam = "*", Duration = 0, NoStore = true)] // will be applied to all actions in MyController, unless those actions override with their own decoration public virtual ActionResult Index(long?personId) { try { if (string.IsNullOrWhiteSpace(personId.ToString())) { personId = long.Parse(User.Identity.GetUserId()); } var state = _personManagementService.GetProfileFullInfo(Convert.ToInt64(personId)); //string s=~/ Content / Images / Avatars / @Model.ModelProfile.Avatar; if (!state.Item1) { return(View(MVC.Errors.Views.Error)); } var grade = EnumerationService.GetEnumValues <Grade>(); var gradeList = new SelectList(grade, "Value", "Text"); TempData["Grade"] = gradeList; var gender = EnumerationService.GetEnumValues <Gender>(); var genderList = new SelectList(gender, "Value", "Text"); TempData["Gender"] = genderList; var militaryServiceStatus = EnumerationService.GetEnumValues <MilitaryServiceStatus>(); var militaryServiceStatusList = new SelectList(militaryServiceStatus, "Value", "Text"); TempData["MilitaryServiceStatus"] = militaryServiceStatusList; var fieldofStudies = (from f in _structureManageService.GetAllFieldofStudy().Item3.AsEnumerable() select new DropDownModel { Value = f.Id.ToString(), Text = f.OrganizationStructureName.Name }).ToList(); var listFieldofStudy = new SelectList(fieldofStudies, "Value", "Text"); TempData["FieldofStudy"] = listFieldofStudy; ViewBag.Cancelurl = Url.Action(MVC.Admin.Person.Index()); ViewBag.ActionUrlSavePassword = Url.Action(MVC.Admin.Profile.SavePassword(), "http"); return(View(state.Item3)); } catch (Exception) { return(View(MVC.Errors.Views.Error)); } }