开发者

Can i find request type in ActionExecutingContext object

开发者 https://www.devze.com 2023-02-03 04:42 出处:网络
I want to identify if 开发者_StackOverflow中文版request is ajax based or simple request from ActionExecutingContext object. Is this possible to identify? Im using C# and Asp.Net MVC 2You could use fil

I want to identify if 开发者_StackOverflow中文版request is ajax based or simple request from ActionExecutingContext object. Is this possible to identify? Im using C# and Asp.Net MVC 2


You could use filterContext.HttpContext.Request.IsAjaxRequest(). The IsAjaxRequest is an extension method of the HttpRequestBase class.

0

精彩评论

暂无评论...
验证码 换一张
取 消