Sometime We cannot use SP.ClientContext in Site pages, Web part pages or Application pages. Although We was following this guide from msdn
Setting Up an Application Page for ECMAScript
If so, please replace the below lines
<script type="text/ecmascript" src="/_layouts/SP.Core.js" />
<script type="text/ecmascript" src="/_layouts/SP.Debug.js" />
<script type="text/ecmascript" src="/_layouts/SP.Runtime.Debug.js" />
With
<SharePoint:ScriptLink ID="ScriptLink1" Name="sp.debug.js" LoadAfterUI="true" Localizable="false" runat="server" />
Không có nhận xét nào:
Đăng nhận xét