webControls 項目 (ASP.NET 設定結構描述)

指定用戶端指令碼檔的共用位置。

<webControls clientScriptsLocation="String" />

屬性和項目

下列章節會說明屬性、子項目和父項目。

屬性

屬性

描述

clientScriptsLocation

必要的 String 屬性。

設定用戶端指令碼位置。

預設值為 "/aspnet_client/{0}/{1}/"。

子項目

無。

父項目

項目

描述

configuration

Common Language Runtime 和 .NET Framework 應用程式所使用之每一個組態檔中的必要根項目。

system.web

在組態檔中,指定 ASP.NET 組態設定的根項目。 包含設定 ASP.NET Web 應用程式和控制該應用程式之行為方式的組態項目。

備註

預設組態

在 .NET Framework 1.0 和 1.1 版中,下列預設 webControls 項目會設定在電腦組態檔中。

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

下列預設 webControls 項目已在 .NET Framework 2.0 版中的根目錄 Web.config 檔中設定。

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

範例

下列範例設定 ASP.NET 應用程式之用戶端指令碼檔案的共用位置。

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

注意

以上範例中的 "{0}" 將由命名空間名稱 (例如,system_web) 取代,而 "{1}" 將由架構版本號碼取代。

項目資訊

組態區段處理常式

System.Web.Configuration.WebControlsSection

組態成員

SystemWebSectionGroup.WebControls

可設定的位置

Machine.config

根層次 Web.config

應用程式層級 Web.config

虛擬或實體目錄層級 Web.config

需求

IIS 5.0、IIS 5.1 或 IIS 6.0

.NET Framework 1.0、1.1 或 2.0

Visual Studio 2003 或 Visual Studio 2005

請參閱

工作

How to: Configure Specific Folders Using Location Settings

How to: Lock ASP.NET Configuration Settings

參考

system.web 項目 (ASP.NET 設定結構描述)

configuration 項目 (一般設定結構描述)

System.Configuration

System.Web.Configuration

概念

ASP.NET Configuration File Hierarchy

Securing Configuration

Configuration Inheritance

其他資源

一般組態設定 (ASP.NET)

ASP.NET 組態設定

Configuring ASP.NET Applications

ASP.NET Configuration Files

ASP.NET Configuration API