Type 'Microsoft.SharePoint.WebControls.ScriptLink' does not have a public property named 'xmlns:SharePoint

Recently I got this error while trying to add some ecmascript/javascript code to my Ediform.aspx.

I checked and re-checked all the references esp. for Microsoft.SharePoint.WebControls in my master page but the page was was not ready to accept the

<sharepoint:scriptlink id="ScriptLink1" name="sp.debug.js" loadafterui="true" localizable="false" runat="server"> tag.

After some research the issue got resolved by wrapping the whole ecmascript code in a <div> tag. The error just went away after that.

I didn't really understand what happened here the tag <sharepoint:scriptlink id="ScriptLink1" name="sp.debug.js" loadafterui="true" localizable="false" runat="server"> works fine in any application page though.

1 comments:

  1. Thanks! This worked for me in similar situation =)
    It seems that it's connected to namespaces used and to stylesheet exclude-result-prefixes attribute. I think, that xml processor adds some namespace attributes to elements and some of them stop working because of that incorrect attributes.
    Don't really understand this though.

    ReplyDelete

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at sharepointprogrammingblogger@gmail.com .

Copyright (c) 2010 @ myshaepointwork.blogspot.com. All rights are reserved.Do Not Copy.

@ Learning SharePoint.com