Поделиться через


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

Значение свойства

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 в классе.

Применяется к