Archives
Archives /
2021
-
Posting AJAX Requests to ASP.NET Core MVC
In the past, I’ve had trouble doing something that is apparently simple: invoking a simple action method in a controller using AJAX. Although it is indeed simple, when using jQuery, it may require some attention, hence this post.
-
ASP.NET Core Pitfalls – Null Models in Post Requests
Sometimes, when AJAX posting to a controller, you may get a null model. Why?
-
ASP.NET Core Pitfalls – AJAX Requests and XSRF
When using Anti Cross Site Scripting Forgery (XSRF) protection in your application, which is on by default, you may be surprised when you try to AJAX submit to a controller and you get a HTTP 400 Bad Request: this may be happening because the framework is blocking your request due to XSRF.