首页 > 其他专区 > SharePoint >

SharePoint 如何读取选项字段所有Choise

SharePoint 2021-09-23 11:08:15

对象模型SPFieldChoice

SPSite site = SPContext.Current.Site;

SPWeb web = site.OpenWeb(SubWebUrl);

SPList list = web.Lists[ListName];

SPFieldChoice fieldchoice = (SPFieldChoice)list.Fields["年份"];

for(int i=0;i

{

  writer.write( fieldchoice.Choices[i].ToString());

}

 

XML描述

2010

2010

2011

2012

很简单的东西,写出来做个记录。


标签: SharePoint读取选项字段所有Ch

office教程网 Copyright © 2016-2020 https://www.office9.cn. Some Rights Reserved.