HttpRequest.Browser プロパティ
要求を実行中のクライアントのブラウザの性能に関する情報を取得または設定します。
名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文
'宣言
Public Property Browser As HttpBrowserCapabilities
'使用
Dim instance As HttpRequest
Dim value As HttpBrowserCapabilities
value = instance.Browser
instance.Browser = value
public HttpBrowserCapabilities Browser { get; set; }
public:
property HttpBrowserCapabilities^ Browser {
HttpBrowserCapabilities^ get ();
void set (HttpBrowserCapabilities^ value);
}
/** @property */
public HttpBrowserCapabilities get_Browser ()
/** @property */
public void set_Browser (HttpBrowserCapabilities value)
public function get Browser () : HttpBrowserCapabilities
public function set Browser (value : HttpBrowserCapabilities)
適用できません。
プロパティ値
クライアントのブラウザの性能を一覧表示する HttpBrowserCapabilities オブジェクト。
使用例
ブラウザの性能の一覧を HTML ページでクライアントに返信するコード例を次に示します。
Dim bc As HttpBrowserCapabilities = Request.Browser
Response.Write("<p>Browser Capabilities:</p>")
Response.Write("Type = " & bc.Type & "<br>")
Response.Write("Name = " & bc.Browser & "<br>")
Response.Write("Version = " & bc.Version & "<br>")
Response.Write("Major Version = " & bc.MajorVersion & "<br>")
Response.Write("Minor Version = " & bc.MinorVersion & "<br>")
Response.Write("Platform = " & bc.Platform & "<br>")
Response.Write("Is Beta = " & bc.Beta & "<br>")
Response.Write("Is Crawler = " & bc.Crawler & "<br>")
Response.Write("Is AOL = " & bc.AOL & "<br>")
Response.Write("Is Win16 = " & bc.Win16 & "<br>")
Response.Write("Is Win32 = " & bc.Win32 & "<br>")
Response.Write("Supports Frames = " & bc.Frames & "<br>")
Response.Write("Supports Tables = " & bc.Tables & "<br>")
Response.Write("Supports Cookies = " & bc.Cookies & "<br>")
Response.Write("Supports VB Script = " & bc.VBScript & "<br>")
Response.Write("Supports JavaScript = " & bc.JavaScript & "<br>")
Response.Write("Supports Java Applets = " & bc.JavaApplets & "<br>")
Response.Write("Supports ActiveX Controls = " & bc.ActiveXControls & "<br>")
Response.Write("CDF = " & bc.CDF & "<br>")
HttpBrowserCapabilities bc = Request.Browser;
Response.Write("<p>Browser Capabilities:</p>");
Response.Write("Type = " + bc.Type + "<br>");
Response.Write("Name = " + bc.Browser + "<br>");
Response.Write("Version = " + bc.Version + "<br>");
Response.Write("Major Version = " + bc.MajorVersion + "<br>");
Response.Write("Minor Version = " + bc.MinorVersion + "<br>");
Response.Write("Platform = " + bc.Platform + "<br>");
Response.Write("Is Beta = " + bc.Beta + "<br>");
Response.Write("Is Crawler = " + bc.Crawler + "<br>");
Response.Write("Is AOL = " + bc.AOL + "<br>");
Response.Write("Is Win16 = " + bc.Win16 + "<br>");
Response.Write("Is Win32 = " + bc.Win32 + "<br>");
Response.Write("Supports Frames = " + bc.Frames + "<br>");
Response.Write("Supports Tables = " + bc.Tables + "<br>");
Response.Write("Supports Cookies = " + bc.Cookies + "<br>");
Response.Write("Supports VB Script = " + bc.VBScript + "<br>");
Response.Write("Supports JavaScript = " + bc.JavaScript + "<br>");
Response.Write("Supports Java Applets = " + bc.JavaApplets + "<br>");
Response.Write("Supports ActiveX Controls = " + bc.ActiveXControls + "<br>");
Response.Write("CDF = " + bc.CDF + "<br>");
HttpBrowserCapabilities bc = get_Request().get_Browser();
get_Response().Write("<p>Browser Capabilities:</p>");
get_Response().Write(("Type = " + bc.get_Type() + "<br>"));
get_Response().Write(("Name = " + bc.get_Browser() + "<br>"));
get_Response().Write(("Version = " + bc.get_Version() + "<br>"));
get_Response().Write(("Major Version = " + bc.get_MajorVersion()
+ "<br>"));
get_Response().Write(("Minor Version = " + bc.get_MinorVersion()
+ "<br>"));
get_Response().Write(("Platform = " + bc.get_Platform() + "<br>"));
get_Response().Write(("Is Beta = " + bc.get_Beta() + "<br>"));
get_Response().Write(("Is Crawler = " + bc.get_Crawler() + "<br>"));
get_Response().Write(("Is AOL = " + bc.get_AOL() + "<br>"));
get_Response().Write(("Is Win16 = " + bc.get_Win16() + "<br>"));
get_Response().Write(("Is Win32 = " + bc.get_Win32() + "<br>"));
get_Response().Write(("Supports Frames = " + bc.get_Frames() + "<br>"));
get_Response().Write(("Supports Tables = " + bc.get_Tables() + "<br>"));
get_Response().Write(("Supports Cookies = " + bc.get_Cookies()
+ "<br>"));
get_Response().Write(("Supports VB Script = " + bc.get_VBScript()
+ "<br>"));
get_Response().Write(("Supports JavaScript = " + bc.get_JavaScript()
+ "<br>"));
get_Response().Write(("Supports Java Applets = "
+ bc.get_JavaApplets() + "<br>"));
get_Response().Write(("Supports ActiveX Controls = "
+ bc.get_ActiveXControls() + "<br>"));
get_Response().Write(("CDF = " + bc.get_CDF() + "<br>"));
var bc : HttpBrowserCapabilities = Request.Browser
Response.Write("<p>Browser Capabilities:</p>")
Response.Write("Type = " + bc.Type + "<br>")
Response.Write("Name = " + bc.Browser + "<br>")
Response.Write("Version = " + bc.Version + "<br>")
Response.Write("Major Version = " + bc.MajorVersion + "<br>")
Response.Write("Minor Version = " + bc.MinorVersion + "<br>")
Response.Write("Platform = " + bc.Platform + "<br>")
Response.Write("Is Beta = " + bc.Beta + "<br>")
Response.Write("Is Crawler = " + bc.Crawler + "<br>")
Response.Write("Is AOL = " + bc.AOL + "<br>")
Response.Write("Is Win16 = " + bc.Win16 + "<br>")
Response.Write("Is Win32 = " + bc.Win32 + "<br>")
Response.Write("Supports Frames = " + bc.Frames + "<br>")
Response.Write("Supports Tables = " + bc.Tables + "<br>")
Response.Write("Supports Cookies = " + bc.Cookies + "<br>")
Response.Write("Supports VB Script = " + bc.VBScript + "<br>")
Response.Write("Supports JavaScript = " + bc.JavaScript + "<br>")
Response.Write("Supports Java Applets = " + bc.JavaApplets + "<br>")
Response.Write("Supports ActiveX Controls = " + bc.ActiveXControls + "<br>")
Response.Write("CDF = " + bc.CDF + "<br>")
プラットフォーム
Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition
Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。
バージョン情報
.NET Framework
サポート対象 : 3.0,2.0,1.1,1.0
参照
関連項目
HttpRequest クラス
HttpRequest メンバ
System.Web 名前空間
ClientTarget
HttpBrowserCapabilities
UserAgent
その他の技術情報
ASP.NET Web サーバー コントロールとブラウザの機能
clientTarget 要素 (ASP.NET 設定スキーマ)