Hi guys ,
i want to get the value of a multiline field in a SharePoint list in a Dropdown control. Every line of the multiline filed will be a choice in the dropdown control. How can i do this?This is the way to get the value:
SPSite site = new SPSite(SPContext.Current.Web.Url); // Contestualizzazione in qualsiasi sito.
SPWeb web1 = site.OpenWeb();
SPList list1 = web1.Lists.TryGetList("Licenses");
SPListItemCollection items1 = list1.GetItems(new SPQuery()
{
Query = @"<Where><IsNotNull><FieldRef Name='Serial' /></IsNotNull></Where>"
});
{
foreach (SPListItem item in items1)
{
string DropDpwnValue = item["Serial"].ToString();
LicenseSerials.Items.Add(DropDpwnValue);
}
}