小编Joh*_*sen的帖子

如何根据用户权限显示习惯菜单项

我有一个CustomAction menuItem

    <CustomAction Id="DocumentManagement.DocLibNewToolbar" Location="EditControlBlock" RegistrationType="ContentType" RegistrationId="0x0101002bae451fbd3640fb9bae5df410b4a9a0" Title="Print">
        <UrlAction Url="~site/_layouts/ELSActionMenu/PrintListItem.aspx?List={ListId}&amp;ID={ItemId}"/>
  </CustomAction>
Run Code Online (Sandbox Code Playgroud)

我知道我可以编写一个SPItemEventReceiver类,并检查当前用户角色是否符合条件.但是我想在ListItem上隐藏这个CustomAction ["授权"] = TRUE,这可能吗?

sharepoint sharepoint-2007

4
推荐指数
1
解决办法
3451
查看次数

JSON到DataTable

我正在尝试将JSON文本序列化为DataTable,如下所示.

List<Dictionary<string, string>> list = 
JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(jsonText);
DataTable dTable;
dTable = (from p in list select p).CopyToDataTable();
Run Code Online (Sandbox Code Playgroud)

我收到以下错误.我如何解决它?

错误:

Cannot deserialize JSON object into type 
'System.Collections.Generic.List`1[System.Collections.Generic.Dictionary`2
[System.String,System.String]]'.
Run Code Online (Sandbox Code Playgroud)

c# json

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

c# ×1

json ×1

sharepoint ×1

sharepoint-2007 ×1