使用ASP.NET通过检测请求头判断是否为移动设备这样写可以吗?

protected void mobileRedirect()
{
string userAgent = Request.UserAgent;
bool isPC = true;

    string[] Agents = new string[] { "Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod" };
    for (int i = 0; i < Agents.Length; i++)
    {
        if (userAgent.IndexOf(Agents[i]) > -1)
        {
            isPC = false;
        }
    }
    if (!isPC)
    {
        Response.Redirect("/wap/index_mo.html");
    }

}
    该方法能检测出所有的移动设备吗?

http://alzhai.com/post-603.html

User-Agent一般都是用来检测移动设备的。你需要有一个映射表关系来知道是什么移动设备