Tag Archives: SharePoint

Get CAS IPermission for exception

If you’re working on a SharePoint solution that requires a custom code access security (CAS) policy, the following is an easy way of determining the permission(s) you need to add to the config. For this to work, you need to … Continue reading

Posted in Security, SharePoint | Tagged , | Leave a comment

Get List Items by Field Value

SharePoint Short #6 To retrieve all SPListItem objects that have a specified field value, instead of writing a CAML query, use the following LINQ statement: public List<SPListItem> GetItemsContainingValue(SPList list, Guid fieldId, string match) { List<SPListItem> matchingItems = (from SPListItem listItem … Continue reading

Posted in SharePoint Shorts | Tagged , | 2 Comments

Validation of viewstate MAC failed in AddWrkfl

I recently added a delegate control to a SharePoint solution. The delegate control was used to dynamically insert a custom user control into the master page. Part of the functionality of this control required the use of hidden fields. Everything … Continue reading

Posted in SharePoint, Workflow | Tagged , , | Leave a comment

Disable SharePoint PeopleEditor

SharePoint Short #5 If you have a requirement to disable the PeopleEditor in SharePoint through JavaScript, the following script will do this for you: function togglePeopleEditor(editor, enable) { // Disables the control but still allows the user to type into … Continue reading

Posted in SharePoint Shorts | Tagged , | Leave a comment