Sdílet prostřednictvím


webControls Element (ASP.NET Settings Schema) 

Specifies the shared location of the client script files.

<webControls clientScriptsLocation="String" />

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

clientScriptsLocation

Required String attribute.

Sets the client scripts location.

Default value is "/aspnet_client/{0}/{1}/".

Child Elements

None.

Parent Elements

Element Description

configuration

The required root element in every configuration file used by the common language runtime and .NET Framework applications.

system.web

Specifies the root element for the ASP.NET configuration settings in a configuration file. Contains configuration elements that configure ASP.NET Web applications and control how the applications behave.

Remarks

Default Configuration

The following default webControls element is configured in the machine configuration file in the .NET Framework versions 1.0 and 1.1.

<webControls clientScriptsLocation="/aspnet_client/{0}/{1}/"/>

The following default webControls element is configured in the root Web.config file in the .NET Framework version 2.0.

<webControls clientScriptsLocation="/aspnet_client/{0}/{1}/" />

Example

The following example sets the shared location of the client script files for an ASP.NET application.

<webControls clientScriptsLocation="/aspnet_client/{0}/{1}/" />
NoteNote

The "{0}" in the above example will be replaced with the namespace name (for example, system_web), and the "{1}" will be replaced with the Framework version number.

Element Information

Configuration Section Handler

System.Web.Configuration.WebControlsSection

Configuration Member

System.Web.Configuration.SystemWebSectionGroup.WebControls

Configurable Locations

Machine.config

Root level Web.config

Application level Web.config

Virtual or physical directory level Web.config

Requirements

IIS 5.0, IIS 5.1, or IIS 6.0

.NET Framework 1.0, 1.1, or 2.0

Visual Studio 2003, or Visual Studio 2005

See Also

Tasks

How to: Configure Specific Directories Using Location Settings
How to: Lock ASP.NET Configuration Settings

Reference

system.web Element (ASP.NET Settings Schema)
configuration Element (General Settings Schema)
System.Configuration
System.Web.Configuration

Concepts

ASP.NET Configuration File Hierarchy and Inheritance
Securing ASP.NET Configuration
ASP.NET Configuration Scenarios

Other Resources

General Configuration Settings (ASP.NET)
ASP.NET Configuration Settings
Configuring ASP.NET Applications
ASP.NET Configuration Files
ASP.NET Configuration API