Ramco Ramco

Ramco Ramco

  • 1.5k
  • 556
  • 21.7k

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)