用Asp.net判断输出终端是浏览器还是手机
public static bool GetClientWeb()
{
bool result = false;
string clientType = string.Concat(HttpContext.Current.Request.UserAgent);
if (clientType.ToLower().Contains("mozilla") || clientType.ToLower().Contains("opera"))
{
result = true;
}
return result;
}
相关文档:
专门给你写了个,你看一下,说明下这里没有考虑到数据的有效性,需要的话自己加上。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebCon ......
本主题介绍在 IIS 7.0 集成模式下运行以及与 IIS 7.0 或更高版本一起运行的 ASP.NET 应用程序的应用程序生命周期。IIS 7.0 还支持经典模式,其行为类似于在 IIS 6.0 中运行的 ASP.NET。有关更多信息,请参见 IIS 5.0 和 6.0 的 ASP.NET 应用程序生命周期概述。
IIS 7.0 集成管道是一种统一的请求处理管道,它同时支 ......
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web ......
protected void Button2_Click(object sender, EventArgs e)
{
bool ok = true;
string fileName;
fileName = DateTime.Now. ......