ClientTarget.Alias Vlastnost

Definice

Získá alias uživatelského agenta.

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

Hodnota vlastnosti

String

Název použitý k odkazu na konkrétního uživatelského agenta.

Atributy

Příklady

Následující příklad kódu ukazuje, jak získat Alias z konfiguračního souboru existující webové aplikace.


// 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)

Poznámky

Vlastnost Alias odkazuje na alias atribut add prvku v clientTarget oddílu konfiguračního souboru.

Výchozí nastavení konfigurace ASP.NET zahrnují následující aliasy:

  • uplevel, který informuje ASP.NET o odesílání HTML a ECMAScriptu, které je podporováno aplikací Internet Explorer 6.0 a novějšími verzemi.

  • downlevel, který informuje ASP.NET omezit html a skript na verze podporované prohlížeči staršími než Internet Explorer 6.0.

Platí pro

Viz také