1
是否有一個JavaScript對象,方法或屬性可用於在字體最終用戶登錄到SharePoint後檢測特定的SharePoint會話變量是否存在?檢測前端用戶登錄到SharePoint 2010後是否存在會話變量
以下似乎工作..
<SharePoint:Delegate runat="server" ControlId="MyDelegateControlTest" Id="MyDelegateControlTest">
<template_Controls>
<script type="text/javascript">var mvar='hello'; console.log('hello world');</script>
</template_Controls>
</SharePoint:DelegateControl>
但我嘗試存儲會話變量分...
<SharePoint:Delegate runat="server" ControlId="MyDelegateControlTest" Id="MyDelegateControlTest">
<template_Controls>
<script type="text/javascript">var mvar='<%= Session["demo"]%>'; console.log('hello world');</script>
</template_Controls>
</SharePoint:DelegateControl>
...我得到我的網頁上一個錯誤,指出「Microsoft.SharePoint.WebControls.DelegateControl不具有公共屬性名稱腳本」
我在做什麼錯了?
因此,如果我有我的主模板上的委託控制集,如何從它內部調用SharePoint會話變量?我假設委託控制只在前端用戶登錄後纔可用?這對我來說都是新的。謝謝 – blackhawk 2013-05-06 14:38:37
看我編輯的代碼示例 – Dan 2013-05-06 15:44:24
我試着實現這個解決方案,但我得到一個錯誤,統計「Microsoft.SharePoint.WebControls.DelegateControl沒有一個公共屬性名稱的腳本,任何建議? – blackhawk 2013-05-06 16:28:22