标签:
1 public void GetSiteColumns(DropDownList ddl, String siteColumn) 2 { 3 var fields = new SPSite(ProjectContent.SiteUrlMapping).RootWeb.Fields; 4 var projectCodeXml = fields.TryGetFieldByStaticName(siteColumn).SchemaXml; 7 XmlDocument xmlDoc = new XmlDocument(); 8 xmlDoc.LoadXml(projectCodeXml); 9 XmlNode xn = xmlDoc.SelectSingleNode("Field/CHOICES"); 10 foreach (var xnl in xn) 11 { 12 XmlElement xe = (XmlElement)xnl; 13 ddl.Items.Add(xe.InnerText); 14 } 15 }
SharePoint 读取 Site Columns 的数据并绑定到DropdownList
标签:
原文地址:http://www.cnblogs.com/bincoding/p/5818711.html