Ramco Ramco

Ramco Ramco

  • 431
  • 3.5k
  • 559.3k

Response.Redirect

Jul 6 2021 11:35 AM

Hi

  How the below line works

 Response.Redirect(String.Format("~/Error/{0}/?message={1}", action, exception.Message));

I have only 1 Action in Controller

 public class ErrorController : Controller
    {
        public ActionResult Index(string message)
        {
            ViewBag.ErrorMessage = message;
            return View();
        }

}

Thanks

 


Answers (3)