顯示廣告
隱藏 ✕
看板 Irice
作者 irice (irice)
標題 [ Asp.Net C# ] 取得瀏覽器資訊
時間 2013年01月03日 Thu. PM 03:26:43


臨時要用找來的程式,先作個備份

private void Button1_Click(object sender, System.EventArgs e)
{
HttpBrowserCapabilities bc;
        string s;
        bc = Request.Browser;
s= "Browser Capabilities" + "\n";
            s += "Type = " + bc.Type + "\n";
            s += "Name = " + bc.Browser + "\n";
            s += "Version = " + bc.Version + "\n";
            s += "Major Version = " + bc.MajorVersion + "\n";
            s += "Minor Version = " + bc.MinorVersion + "\n";
            s += "Platform = " + bc.Platform + "\n";
            s += "Is Beta = " + bc.Beta + "\n";
            s += "Is Crawler = " + bc.Crawler + "\n";
            s += "Is AOL = " + bc.AOL + "\n";
            s += "Is Win16 = " + bc.Win16 + "\n";
            s += "Is Win32 = " + bc.Win32 + "\n";
            s += "Supports Frames = " + bc.Frames + "\n";
            s += "Supports Tables = " + bc.Tables + "\n";
            s += "Supports Cookies = " + bc.Cookies + "\n";
            s += "Supports VB Script = " + bc.VBScript + "\n";
            s += "Supports JavaScript = " + bc.JavaScript + "\n";
            s += "Supports Java Applets = " + bc.JavaApplets + "\n";
            s += "Supports ActiveX Controls = " + bc.ActiveXControls + "\n";
        TextBox1.Text = s;

}



--
※ 作者: irice 時間: 2013-01-03 15:26:43
※ 看板: Irice 文章推薦值: 0 目前人氣: 0 累積人氣: 496 
guest
x)推文 r)回覆 e)編輯 d)刪除 M)收藏 ^x)轉錄 同主題: =)首篇 [)上篇 ])下篇