Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

SaveButton Class

Windows SharePoint Services 3

Provides a button, usually on a form toolbar, that is used to save a new or edited list item on the form.

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

[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class SaveButton : FormComponent

The SaveButton control will not render if the ControlMode value is Display.

Use the SaveButton class when you create a custom form for creating or editing items stored in a list.

The following code samples show how to instantiate a SaveButton object, set the Text, and then, in the C# and Visual Basic .NET code samples, add the SaveButton to the controls collection of the page.

[xml]

<SharePoint:SaveButton runat="server" ID="CustomFormSaveButton" Text="Create!" >

[C#]

SaveButton CustomFormSaveButton = new SaveButton();
this.Controls.Add(CustomFormSaveButton);

[Visual Basic]

Dim CustomFormSaveButton As SaveButton = New SaveButton()
Me.Controls.Add(CustomFormSaveButton)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2015 Microsoft