ClientTarget.Alias Egenskap

Definition

Hämtar användaragentens 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

Egenskapsvärde

Namnet som används för att referera till en specifik användaragent.

Attribut

Exempel

Följande kodexempel visar hur du hämtar Alias från konfigurationsfilen för ett befintligt webbprogram.


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

Kommentarer

Egenskapen Alias refererar till alias attributet för elementet addclientTarget i avsnittet i konfigurationsfilen.

Standardinställningarna för ASP.NET konfiguration innehåller följande alias:

  • uplevel, som uppmanar ASP.NET att skicka HTML och ECMAScript som stöds av Internet Explorer 6.0 och senare versioner.

  • downlevel, som uppmanar ASP.NET att begränsa HTML och skriptet till de versioner som stöds av webbläsare tidigare än Internet Explorer 6.0.

Gäller för

Se även