Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

How to get column data based on list selection ?

$
0
0

Hello,

Am using this code to get all the list name from in dropdown selector now I want to display first 10 name and city based on the list selection.How we can modify this code to get first 10 name based on list selection.

 protected void Page_Load(object sender, EventArgs e)
        {
            SPSite mySite = SPContext.Current.Site;
            SPWebCollection myWebCollection = mySite.AllWebs;
            foreach (SPWeb myWeb in myWebCollection)
            {
                SPListCollection myListCollection = myWeb.Lists;
                foreach (SPList myList in myListCollection)
                {
                    DropDownList1.Items.Add(new ListItem(SPEncode.HtmlEncode(myList.Title)));
                }
                myWeb.Dispose();
            }
        }

Thanks,


Viewing all articles
Browse latest Browse all 11571

Trending Articles



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