次の方法で共有


ClientTarget.Alias プロパティ

定義

ユーザー エージェントのエイリアスを取得します。

public:
 property System::String ^ Alias { System::String ^ get(); };
[System.Configuration.ConfigurationProperty("alias", IsKey=true, IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string Alias { get; }
[<System.Configuration.ConfigurationProperty("alias", IsKey=true, IsRequired=true)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Alias : string
Public ReadOnly Property Alias As String

プロパティ値

特定のユーザー エージェントを参照するために使用する名前。

属性

次のコード例は、既存の Web アプリケーションの構成ファイルから を Alias 取得する方法を示しています。


// Get the first client target 
// in the collection.
clientTarget = clientTargets[0];

// Get the alias.
alias = clientTarget.Alias;

msg = String.Format(
      "Alias:      {0}\n",
      alias);
' Get the first client target 
' in the collection.
clientTarget = clientTargets(0)

' Get the alias.
aliasStr = clientTarget.Alias

msg = String.Format( _
"Alias:      {0}" + ControlChars.Lf, aliasStr)

注釈

プロパティは Aliasalias 構成ファイルの add セクションの clientTarget 要素の属性を参照します。

ASP.NET 構成の既定値には、次のエイリアスが含まれます。

  • uplevelは、Internet Explorer 6.0 以降のバージョンでサポートされている HTML と ECMAScript を送信するように ASP.NET に指示します。

  • downlevelは、html とスクリプトを Internet Explorer 6.0 より前のブラウザーでサポートされているバージョンに制限するように ASP.NET に指示します。

適用対象

こちらもご覧ください