当前位置:首页  »  编程知识  »  用ASP.NET识别浏览器

  • 用ASP.NET识别浏览器

  • 网络教育吧为广大网友收集整理了,用ASP.NET识别浏览器,希望对大家有所帮助!

    下面是一个关于HttpBrowserCapabilities组件的应用例子。


     
        public void Page_Load(Object Source, EventArgs E)
        {
          HttpBrowserCapabilities bc= Request.Browser;
          Wele.Text = "您好,您正在使用 " + bc.Browser + " v." + bc.Version + ",你的运行平台是 " + bc.Platform ;
          ActiveXControls.Text = bc.ActiveXControls.ToString();
          AOL.Text = bc.AOL.ToString();
          BackgroundSounds.Text = bc.BackgroundSounds.ToString();
          Beta.Text = bc.Beta.ToString();
          Browser.Text = bc.Browser.ToString();
          CDF.Text = bc.CDF.ToString();
          Cookies.Text = bc.Cookies.ToString();
          Crawler.Text = bc.Crawler.ToString();
          Frames.Text = bc.Frames.ToString();
          JavaApplets.Text = bc.JavaApplets.ToString();
          JavaScript.Text = bc.JavaScript.ToString();
          MajorVersion.Text = bc.MajorVersion.ToString();
          MinorVersion.Text = bc.MinorVersion.ToString();
          Platform.Text = bc.Platform.ToString();
          Tables.Text = bc.Tables.ToString();
          Type.Text = bc.Type.ToString();
          VBScript.Text = bc.VBScript.ToString();
          Version.Text = bc.Version.ToString();
          Win16.Text = bc.Win16.ToString();
          Win32.Text = bc.Win32.ToString();
        }
     




    您的浏览器信息已经完全在我们的掌握中了^&^:




     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     


     
     

    浏览器属性测试结果
    ActiveXControls:
    AOL:
    BackgroundSounds:
    Beta:
    Browser:
    CDF:
    Cookies:
    Crawler:
    Frames:
    JavaApplets:
    JavaScript:
    MajorVersion:
    MinorVersion:
    Platform:
    Tables:
    Type:
    VBScript:
    Version:
    Win16:
    Win32:



    全国精品课程资源库
  • 友情链接