How to replace Request.IsAjaxRequest() in ASP.NET Core
By FoxLearn 2/18/2024 9:23:59 AM 549
This post shows you how to replace Request.IsAjaxRequest() in ASP.NET Core
You can't find Request.IsAjaxRequest() method in ASP.NET Core.
To check your ajax request in ASP.NET Core you can use Context.Request.Headers.
var ajaxRequest = Context.Request.Headers["X-Requested-With"] == "XMLHttpRequest";
I hope so, you can solve your problem.
- Options Pattern In ASP.NET Core
- Implementing Rate Limiting in .NET
- IExceptionFilter in .NET Core
- Repository Pattern in .NET Core
- CRUD with Dapper in ASP.NET Core
- How to Implement Mediator Pattern in .NET
- How to use AutoMapper in ASP.NET Core
- How to fix 'asp-controller and asp-action attributes not working in areas'
Categories
Popular Posts
Stisla Admin Dashboard Template
11/18/2024
Admin Tailwind CSS Admin Dashboard Template
11/18/2024
Portal HTML Bootstrap
11/14/2024