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 }