开发者

Can i find request type in ActionExecutingContext object

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜