[英]How can I access the MethodInfo.ReturnType for an ActionDescriptor within the ActionExecutingContext?
[英]Can i find request type in ActionExecutingContext object
我想確定請求是基於Ajax還是來自ActionExecutingContext對象的簡單請求。 是否可以識別? 我正在使用C#和Asp.Net MVC 2
您可以使用filterContext.HttpContext.Request.IsAjaxRequest()
。 IsAjaxRequest是HttpRequestBase類的擴展方法。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.