Return 404 in MVC Controller - C#

Return 404 in MVC Controller - C#

code snippet

c#
Response.StatusCode = 404;
Response.TrySkipIisCustomErrors = true;
return View("Error");

"The secret of getting ahead is getting started"

Contact me!

Have questions? Feel free to use the form or send me an email with any questions.

I will be responsive to your requests and your questions.