SP根据ID值获取文档属性

时间:2019-05-16 02:51:39

标签: c# asp.net list function sharepoint

我想根据SharePoint中文件夹的ID值获取UnqueID或其他属性。

Ascx-获取folder.value:

<div class="tab-content">
    <div id="sectionC" class="tab-pane fade in active">
        <asp:ListBox runat="server" ID="listFolder" CssClass="fileHeight" Style="width: 100%;" SelectionMode="Single" ClientIDMode="Static" onclick="onListFolderClick(); ">
        </asp:ListBox>

function UpdateListFolder() {
    var hidListFolder = document.getElementById('hidListFolder');
    var listbox = document.getElementById('listFolder');
    var listLength = listbox.options.length;
    hidListFolder.value = "";
    for (var i = 0; i < listLength; i++) {
        hidListFolder.value += listbox.options[i].value + '§';
    }
    console.log("hidListFolder: " + hidListFolder.value);
}

后端:

//Contains a delimetered string of folder IDs 
//Sample output: PHDß1§A_Tß1§AC2ß1§

String[] allSelectedFolders = hidListFolder.Text.Split(new Char[] { '§' });

foreach (String i in allSelectedFolders)
{
    //Get UniqueID or other attributes by each ID 
}

SP列表列(当前正在检索“ Header Ref”):

enter image description here

问题:我想获取ID而不是标题引用。

0 个答案:

没有答案