using Microsoft.SharePoint.WebControls;
offers the SPControlMode enumeration with the members:
- Display
- Edit
- Invalid
- New
You can check the current mode by using the SPContext.Current object:
if (SPContext.Current.FormContext.FormMode == SPControlMode.Edit)
{
}
If you want implement a custom WebControl you can use Microsoft.SharePoint.WebControls.SPControlMode.Display to determine if your custom WebControl is in display or edit mode.
No comments:
Post a Comment