title: Determine if request is PartialView or AJAX request in ASP.NET MVC 3
body: <p>I have to give access rigths to the users of a website.
  I am doing the filtering here:</p>
  
  <pre><code>protected override void OnActionExecuting(ActionExecutingContext filterContext)
  {
  }
  </code></pre>
  
  <p>The problem is that I cannot distinguish full View request such as 'Index' from PartialViewRequests or AJAX calls requests.</p>
  
  <p>Therefore the page <code>'Index'</code> has access but the <code>'PartialViewGridViewForIndex'</code> does not have access.</p>
  
  <p>The property <code>ControllerContext.IsChildAction</code> does not help either.</p>