Dynamically updating the X-UA-Compatible tag in a WebPart for SharePoint 2010

Posted by on Aug 25, 2016 in Sharepoint, SharePoint 2010, SharePoint 2010 Foundation, SharePoint 2010 Server |

So i came across this problem where the default document mode in SharePoint 2010¬†was IE8 (legacy mode…) and i was developing an angular app that would be plugged into the site.

I did not want to update the masterpage as this may cause other issues with other parts of SharePoint. My only option was to update the Compatibility tag dynamically in the OnInit method on my WebPart.


Read More

SharePoint – Can’t edit user email address using “My Settings”

Posted by on Dec 4, 2013 in Sharepoint, SharePoint 2010 Foundation, SharePoint 2010 Server, SharePoint 2013 |

Came across this problem while testing some workflow approvals on my SharePoint 2013 instance, needed to change the email addresses of my test users.

edit settings



The fix:

Run this powershell script to programmatically update the email address of the SPUser object.




Read More

Getting total document count for a SharePoint site

Posted by on Nov 7, 2013 in C#, Sharepoint, SharePoint 2010 Foundation, SharePoint 2010 Server |

I had a customer wanting to find out the total number of documents under a site. Quickly came up with a Webservice method that ran a query on all the lists on the site to get a total count. Run this from a ribbon or in your custom web app solution in SharePoint



Read More

SharePoint 2010 Developer Dashboard

Posted by on Jul 10, 2011 in Sharepoint |

Developer Dashboard is one of the hidden features in SharePoint 2010. It is turned off by default.

Enabling this feature will help you get critical information such as Execution time, log ID, critical events, database queries, service calls, SPRequest allocation and webpart events.

Developer Dashboard Modes:

‘On’ Mode:


on Powershell:

When in this mode, it stays on be default:


‘On Demand’ Mode:


You will have to click the icon for the developer dashboard to show:

Disable Developer Dashboard:


Dashboard not shown or enabled.

Read More
%d bloggers like this: