Skip to content

Instantly share code, notes, and snippets.

@danielplawgo
Last active May 16, 2018 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielplawgo/cb6c3d6c19d5c273d7371be9a941b6ac to your computer and use it in GitHub Desktop.
Save danielplawgo/cb6c3d6c19d5c273d7371be9a941b6ac to your computer and use it in GitHub Desktop.
Filtry Akcji – ASP.NET MVC
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
}
public class HomeController : Controller
{
[HandleError]
public ActionResult Index()
{
return View();
}
}
[HandleError]
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
}
@danielplawgo
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment