Creating custom master pages – deploying using a feature

The following article does a good job of explaining how to create custom master pages and deploy to a Site Collection.
 
http://heathersolomon.com/blog/articles/servermstpageforsitecollect_feature.aspx
 
However certain error messages were observed when using a master paged cribed from another site template through SharePoint Designer.
 
The following errors were observed:
error CS0030: Cannot convert type ‘Microsoft.SharePoint.WebControls.ScriptLink’ to ‘System.Web.UI.IAttributeAccessor’
 
and
 
error CS0030: Cannot convert type ‘Microsoft.SharePoint.WebControls.EncodedLiteral’ to ‘System.Web.UI.IAttributeAccessor’
 
This it turns out is due to the way the master page is “”exported”” from SharePoint designer. Dont try to do anything fancy like use the publishing features simply copy and paste the code from one master page to the other from the Code view in SharePoint Designer. I have yet to investigate the exact technical cause but I believe it has something to do with HTML encoding of the various symbols like “”<"" to ""alt;"" etc.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s