共用方式為


HttpRuntimeSection.RequireRootedSaveAsPath 屬性

定義

取得或設定值,表示檔名是否必須是完整的實體檔案路徑。

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

屬性值

Boolean

如果檔名是完整的實體檔案路徑則為 true,否則為 false。 預設值是 true

屬性

範例

下列範例將示範如何使用 RequireRootedSaveAsPath 屬性。

// 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

備註

屬性 RequireRootedSaveAsPath 會指定方法的檔案名引數 SaveAs 是否必須是根路徑。 ASP.NET 進程必須具有在指定位置中建立檔案的許可權。

如需詳細資訊,請參閱 類別中 Configuration 定義的儲存方法。

適用於