Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Get multiline value field in a drop down c#

$
0
0

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);


                    }
                }


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>