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,