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