Monthly Archives: July 2011

Weird rendering behaviour in SharePoint with self-closing DIV tags

I was doing branding in SharePoint 2010 and noticed that SharePoint will render elements declared after a self-closing DIV as children of that DIV. So, if my master page has something like this: The page will be rendered as: Changing … Continue reading

Posted in Branding, SharePoint | Leave a comment

Weird error deploying SharePoint workflow using Visual Studio

It was working all fine, until one day I started getting the error below when deploying the workflow using Visual Studio: Error occurred in deployment step ‘Activate Features’: Unable to locate the workflow’s association data. To restore the association data to … Continue reading

Posted in Visual Studio 2010, Workflow | Leave a comment

‘WARNING: Template is not found and is not applied’ when using custom WebTemplate with PowerShell

WebTemplate is the new way of doing site definitions in SP2010 (see this for a good overview: http://sharepointchick.com/archive/0001/01/01/site-definitions-vs.-webtemplates.aspx). Where you need to refer to the custom WebTemplate, you’d use the ‘{FeatureID}#WebTemplateName’ syntax, e.g: {56C8E551-565B-482A-A038-CCC18A878607}#MyWebTemplate I however have found that this does … Continue reading

Posted in PowerShell, SharePoint 2010, WebTemplate | 4 Comments

How to enable Export on custom SharePoint web part

By default your custom SharePoint 2010 web parts will not have the Export command enabled. To enable this command, in your .webpart file, add the following element in the <properties> section: <property name=”ExportMode” type=”exportmode”>All</property>

Posted in SharePoint 2010, WebPart | Leave a comment

Free alternative to Reflector!

So happy I found this had to blog about it: http://wiki.sharpdevelop.net/ilspy.ashx. Still in Beta but looks very promising. Woohoo!

Posted in Stuffs | Leave a comment

Can’t get UpdatePanel in your web part to do AJAX-postback?

If your web part is creating the UpdatePanel dynamically, e.g. in the CreateChildControls() method, check that: The UpdatePanel has an ID assigned The UpdatePanel’s UpdateMode property is set to Conditional. The default is Always. The control triggering the postback (e.g. a … Continue reading

Posted in AJAX, SharePoint 2010, WebPart | Leave a comment

Can’t get RemoveFieldRef in your custom content type schema to work?

Check that: The Inherits attribute in <ContentType> is FALSE Check the casing of the GUID specified in <RemoveFieldRef>. My testing shows that this is case-sensitive. On the latter point above, it is best to write a harness program to check … Continue reading

Posted in Content Types, SharePoint | Leave a comment