SPPageStateControl.EnsureItemSavedIfEditMode 方法 (Boolean)
确保项目保存到服务器,如果它是必需的并强制保存,如果有版本冲突。
命名空间: Microsoft.SharePoint.WebControls
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Overridable Function EnsureItemSavedIfEditMode ( _
forceSave As Boolean _
) As Boolean
用法
Dim instance As SPPageStateControl
Dim forceSave As Boolean
Dim returnValue As Boolean
returnValue = instance.EnsureItemSavedIfEditMode(forceSave)
public virtual bool EnsureItemSavedIfEditMode(
bool forceSave
)
参数
forceSave
类型:System.Booleantrue强制即使没有版本冲突,然后再继续完成的请求的服务器操作保存的项目。
返回值
类型:System.Boolean
保存true以确保项目 ;否则为false。
备注
如果命令处理程序执行的操作 (如签入或发布到服务器的文件,它应调用此方法之前服务器执行请求的操作,将项目保存回服务器。此方法可确保如果不需要执行此操作保存项目。