Blog.Admin.Web.Controllers.ProfileImageController.ProfileImage C# (CSharp) Method

ProfileImage() public method

public ProfileImage ( int userId ) : System.Web.Mvc.ActionResult
userId int
return System.Web.Mvc.ActionResult
        public ActionResult ProfileImage(int userId)
        {
            try
            {
                var model = GetViewModel(userId, false);

                ViewBag.ViewHeader = string.Format("Change {0}'s profile picture", model.Username);
                ViewBag.Title = string.Format("{0}'s profile picture", model.Username);

                return View("ProfileImage", model);
            }
            catch (Exception ex)
            {
                _errorSignaler.SignalFromCurrentContext(ex);
                ViewBag.ErrorMessage = "Failed to get user image. Try refreshing the page.";
                return View("ProfileImage");
            }
        }