WebControlsSection.ClientScriptsLocation Property
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 client scripts location.
public:
property System::String ^ ClientScriptsLocation { System::String ^ get(); };
C#
[System.Configuration.ConfigurationProperty("clientScriptsLocation", DefaultValue="/aspnet_client/{0}/{1}/", IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string ClientScriptsLocation { get; }
[<System.Configuration.ConfigurationProperty("clientScriptsLocation", DefaultValue="/aspnet_client/{0}/{1}/", IsRequired=true)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.ClientScriptsLocation : string
Public ReadOnly Property ClientScriptsLocation As String
The location of the client scripts.
- Attributes
The following code example shows how to obtain the ClientScriptsLocation.
C#
// Get the Web application configuration.
System.Configuration.Configuration configuration =
WebConfigurationManager.OpenWebConfiguration(
"/aspnetTest");
// Get the <webControls> section.
WebControlsSection webControlsSection =
(WebControlsSection)configuration.GetSection(
"system.web/webControls");
// Read the client script location.
string clientScriptLocation =
webControlsSection.ClientScriptsLocation;
string msg = String.Format(
"Client script location: {0}\n",
clientScriptLocation);
Console.Write(msg);
' Get the Web application configuration.
Dim configuration _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the <webControls> section.
Dim webControlsSection _
As WebControlsSection = _
CType(configuration.GetSection( _
"system.web/webControls"), WebControlsSection)
' Read the client script location.
Dim clientScriptLocation As String = _
webControlsSection.ClientScriptsLocation
Dim msg As String = _
String.Format( _
"Client script location: {0}" + _
ControlChars.Lf, clientScriptLocation)
Console.Write(msg)
For details about the client scripts and their use, refer to Client Script in ASP.NET Web Pages.
Производ | Верзије |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Сарађујте са нама на GitHub-у
Извор овог садржаја можете пронаћи на платформи GitHub, где можете и да креирате и прегледате проблеме и захтеве за повлачењем. Више информација потражите у нашем водичу за сараднике.
.NET повратне информације
.NET је пројекат отвореног кода. Изаберите везу да бисте обезбедили повратне информације: