用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 ......
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 ......
今天在服务器装好 .net Framework 3.5后,运行ASP.NET 出现程序错误,但是又没有出现特定程序错误,说叫查看日记文件,一看,说什么 程序域有问题,百度之后,很管用: 应用程序池 -- 属性 -- 标识 -- 改成 本地系统 问题解决。特此记录。 ......