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.
精彩评论