///
/// 是否是get请求
///
///
public static bool IsGet()
{
return HttpContext.Current.Request.HttpMethod == "GET";
}
///
/// 是否是post请求
///
///
public static bool IsPost()
{
return HttpContext.Current.Request.HttpMethod == "POST";
}
///
/// 是否是Ajax请求
///
///
public static bool IsAjax()
{
return HttpContext.Current.Request.Headers["X-Requested-With"] == "XMLHttpRequest";
}
上一篇:tmux使用