Bagikan melalui


HttpRuntimeSection.RequireRootedSaveAsPath Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah nama file harus merupakan jalur file fisik yang sepenuhnya memenuhi syarat.

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

Nilai Properti

true jika nama file harus merupakan jalur file fisik yang sepenuhnya memenuhi syarat; jika tidak, false. Nilai defaultnya adalah true.

Atribut

Contoh

Contoh berikut menunjukkan cara menggunakan RequireRootedSaveAsPath properti .

// Get the RequireRootedSaveAsPath property value.
Response.Write("RequireRootedSaveAsPath: " +
  configSection.RequireRootedSaveAsPath + "<br>");

// Set the RequireRootedSaveAsPath property value to true.
configSection.RequireRootedSaveAsPath = true;
' Get the RequireRootedSaveAsPath property value.
Response.Write("RequireRootedSaveAsPath: " & _
  configSection.RequireRootedSaveAsPath & "<br>")

' Set the RequireRootedSaveAsPath property value to true.
configSection.RequireRootedSaveAsPath = True

Keterangan

Properti RequireRootedSaveAsPath menentukan apakah argumen nama file ke SaveAs metode harus berupa jalur berakar. Proses ASP.NET harus memiliki izin untuk membuat file di lokasi yang ditentukan.

Untuk informasi selengkapnya, lihat metode simpan yang ditentukan di Configuration kelas .

Berlaku untuk