Share via


OutputCacheProfile.Name 屬性

定義

取得或設定 OutputCacheProfile 名稱。

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))]
[System.Configuration.ConfigurationProperty("name", DefaultValue="", IsKey=true, IsRequired=true)]
[System.Configuration.StringValidator(MinLength=1)]
public string Name { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))>]
[<System.Configuration.ConfigurationProperty("name", DefaultValue="", IsKey=true, IsRequired=true)>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Name : string with get, set
Public Property Name As String

屬性值

String

OutputCacheProfile 名稱。

屬性

範例

下列程式碼範例示範如何使用 Name 屬性。


// Get the current Name.
String nameValue = 
    outputCacheProfile.Name;

// Set the Name.
outputCacheProfile.Name = 
    string.Empty;
  ' Get the current Name.
  Dim nameValue As String = _
  outputCacheProfile.Name

  ' Set the Name property.
  outputCacheProfile.Name = _
  String.Empty

備註

Name如果您想要將值套用 OutputCacheProfile 至頁面或控制項, @ OutputCache 請使用 將值指派給 CacheProfile 指示詞的 屬性。

適用於