public ActionResult Details(int id) { // Get application details model ApplicationDetails result = _applications.GetApplicationDetailsModel(id, LoggedInUser); // Format tokens for display foreach (var item in result.Hosts) { // Encode token item.Token = HttpUtility.UrlEncode(item.Token); } // Setup back url ViewBag.PreviousUrl = Url.Action("Index", "Home"); // Return view return(View(result)); }