共用方式為


SPWeb.AllowUnsafeUpdates Property

Gets or sets a Boolean value that specifies whether to allow updates to the database as a result of a GET request or without requiring a security validation.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

Public Property AllowUnsafeUpdates As Boolean
    Get
    Set

Dim instance As SPWeb
Dim value As Boolean

value = instance.AllowUnsafeUpdates

instance.AllowUnsafeUpdates = value
public bool AllowUnsafeUpdates { get; set; }

Property Value

Type: System.Boolean
true if unsafe updates are allowed; otherwise, false.

Remarks

Warning

Setting this property to true opens security risks, potentially introducing cross-site scripting vulnerabilities.

See Also

Reference

SPWeb Class

SPWeb Members

Microsoft.SharePoint Namespace