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

Unfortunately I have seen this error too many times. In my case it is regarding a SharePoint master page customization, and I believe it is related to editing the master page in SharePoint designer. Maybe it only occurs when you edit the page and then try saving it back to the Globals or some other folder, haven't confirmed exaclty the steps that cause it...

But the way to fix it is to open the master page in notepad and you'll see a big chunk of html that is commented out. Delete that chunk, and the master page will work properly again. [The next time it occurs I'll come back and clean up this entry with more specifics...]

Comments

  • Anonymous
    October 05, 2007
    PingBack from http://www.artofbam.com/wordpress/?p=5427

  • Anonymous
    January 06, 2009
    From what I can see, copying code out of SP designer changes the code. For instance, the following code: <asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server" ></asp:ContentPlaceHolder> Is changed to: <asp:ContentPlaceHolder id=PlaceHolderPageTitle runat="server" ></asp:ContentPlaceHolder> Anyway, that's my 2 cents worth.

  • Anonymous
    January 29, 2009
    Thank you sooooo much!  I would have never guessed that was the issue.  I just got this today and it was on a custom master page that was modified in SP Designer.  Sure enough when I opened it in NotePad there was a commented out code on a Delegate Control.  Deleted it and the error went away.

  • Anonymous
    August 21, 2013
    how to find chunk data,i Have open in notepad but didn't recognition which is chunk data.

  • Anonymous
    August 21, 2013
      " open the master page in notepad    You’ll see a big chunk of html code that is commented out.    Mostly this will be at the end of the page after </html> tag.    Delete that chunk of data. The master page will work properly again.    Now check your page in browser which is error free." but i didn't find any thing after </html>