Ramco Ramco

Ramco Ramco

  • 440
  • 3.4k
  • 529.6k

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)