System.ExtensionMethods.IsAjaxRequest C# (CSharp) 메소드

IsAjaxRequest() 공개 정적인 메소드

public static IsAjaxRequest ( this @this ) : bool
@this this
리턴 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;
        }
    }