共用方式為


CompilationSection.Batch 屬性

定義

取得或設定一個值,指示是否嘗試批次編譯。

public:
 property bool Batch { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("batch", DefaultValue=true)]
public bool Batch { get; set; }
[<System.Configuration.ConfigurationProperty("batch", DefaultValue=true)>]
member this.Batch : bool with get, set
Public Property Batch As Boolean

屬性值

true若嘗試批次編譯;否則,。 false 預設值為 true

屬性

範例

以下程式碼範例示範如何使用該 Batch 屬性。 此程式碼範例是本類別更大範例 CompilationSection 的一部分。

// Display Batch property.
Console.WriteLine("Batch: {0}", configSection.Batch);

// Set Batch property.
configSection.Batch = true;
' Display Batch property.
Console.WriteLine("Batch: {0}", _
 configSection.Batch)

' Set Batch property.
configSection.Batch = True

備註

將此屬性設為 , true 以改變存取未編譯檔案時因編譯所需的延遲。 將此屬性設為 時 true ,指令 ASP.NET 以批次模式預先編譯所有未編譯檔案。 檔案首次編譯時會有延遲;但一旦檔案編譯完成,延遲就會消失。

適用於