Answers for "how to detect ajax request in asp.net core"

C#
0

how to detect ajax request in asp.net core

public class AjaxOnlyAttribute : ActionMethodSelectorAttribute
{
    public override bool IsValidForRequest(RouteContext routeContext, ActionDescriptor action)
    {
        return routeContext.HttpContext.Request.IsAjaxRequest();
    }
}
Posted by: Guest on November-07-2021

Code answers related to "how to detect ajax request in asp.net core"

C# Answers by Framework

Browse Popular Code Answers by Language