SaveButton.SaveItem 方法 (SPContext, Boolean, String)
保存的列表项和签入并将其上载的文档库列表时。
命名空间: Microsoft.SharePoint.WebControls
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function SaveItem ( _
itemContext As SPContext, _
uploadMode As Boolean, _
checkInComment As String _
) As Boolean
用法
Dim itemContext As SPContext
Dim uploadMode As Boolean
Dim checkInComment As String
Dim returnValue As Boolean
returnValue = SaveButton.SaveItem(itemContext, _
uploadMode, checkInComment)
public static bool SaveItem(
SPContext itemContext,
bool uploadMode,
string checkInComment
)
参数
itemContext
类型:Microsoft.SharePoint.SPContext一个对象,其中包含请求的上下文信息。
uploadMode
类型:System.Booleantrue表示列表项为文档上载 ;否则为false。
checkInComment
类型:System.String项目的说明性注释的文本。
返回值
类型:System.Boolean
在所有情况下true 。
异常
异常 | 条件 |
---|---|
ArgumentNullException | itemContext或checkInComment是空引用(无 在 Visual Basic 中)。 |
InvalidOperationException | itemContext。Item是空引用(无 在 Visual Basic 中)。 |
备注
SaveItem始终返回true ,如果该方法完成而不会引发异常。