System.ExtensionMethods.IsAjaxRequest C# (CSharp) Méthode

IsAjaxRequest() public static méthode

public static IsAjaxRequest ( this @this ) : bool
@this this
Résultat bool
        public static bool IsAjaxRequest(this HttpRequest @this)
        {
            if (@this == null)
                throw new ArgumentNullException("request");
            if (@this.Headers["X-Requested-With"] == "XMLHttpRequest")
                return true;
            if (@this.Headers != null)
                return @this.Headers["X-Requested-With"] == "XMLHttpRequest";
            return false;
        }
    }