Friday, July 20, 2012

Cannot convert type 'Microsoft.SharePoint.WebControls.DelegateControl' to 'System.Web.UI.IAttributeAccessor'


When you are working with master page using SharePoint designer sometimes junk data will be added to the master page as shown below. 

in my scenario junk data added to <SharePoint:DeveloperDashboard control

  <div id="DeveloperDashboard" class="ms-developerdashboard">
                     <SharePoint:DeveloperDashboard runat="server" id="ddashboard" __designer:Preview="[ DeveloperDashboard &quot;ddashboard&quot; ]" __designer:Values="&lt;P N='ID' T='ddashboard' /&gt;&lt;P N='Page' ID='1' /&gt;&lt;P N='TemplateControl' ID='2' /&gt;&lt;P N='AppRelativeTemplateSourceDirectory' R='-1' /&gt;"/>
              </div>


Error:


http://server/sites/sitecol1/_catalogs/masterpage/CustomMaster.master(502): error CS0030: Cannot convert type 'Microsoft.SharePoint.WebControls.DeveloperDashboard' to 'System.Web.UI.IAttributeAccessor'
        
Solution : 

 To fix this issue, you can search the whole master page has value like " __designer:Preview " or " "__designer:Values ", remove them using notepad file or SharePoint designer which ever is possible.


No comments:

Post a Comment

Followers