ClientTarget.Alias Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the user agent's 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
Property Value
The name used to refer to a specific user agent.
- Attributes
Examples
The following code example shows how to get the Alias from the configuration file of an existing Web application.
// 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)
Remarks
The Alias property refers to the alias
attribute of the add
element in the clientTarget
section of the configuration file.
The ASP.NET configuration defaults include the following aliases:
uplevel
, which tells ASP.NET to send HTML and ECMAScript that is supported by Internet Explorer 6.0 and later versions.downlevel
, which tells ASP.NET to limit the HTML and script to the versions that are supported by browsers earlier than Internet Explorer 6.0.
Applies to
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應