在手机中判断WEB或WAP访问

        string types=Request.ServerVariables["HTTP_ACCEPT"].ToLower ().ToString ();
        if (types .IndexOf ("text/vnd.wap.wml")>0)
        {
            Response.Redirect("index.aspx");
        }
        else
        {
            Response.Redirect("index1.aspx");
        }
posted @ 2007-11-22 13:48  新房客  阅读(357)  评论(0编辑  收藏  举报