当前位置:主页 > Office办公 > SharePoint读取选项字段所有Choise

SharePoint读取选项字段所有Choise

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

对象模型SPFieldChoiceSPSite site = SPContext.Current.Site;SPWeb web = site.OpenWeb(SubWebUrl);SPList list = web.Lists[ListName];SPFieldChoice fieldchoice = (SPFieldChoice)list.Fields["年份"];for(int i=0;i<fieldchoice.Choices.Count;i++){  writer.write( fieldchoice.Choices[i].ToString());}