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

BackgroundImage() public method

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

                ViewBag.ViewHeader = string.Format("Change {0}'s background picture", model.Username);
                ViewBag.Title = string.Format("{0}'s background 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");
            }
        }