How do I get to Sites that are built off the main root site (http://sptest.domain.com/)
Then listed in the "Sites" folder in the SharePoint Connnections Tree?
http://sptest.domain.com/Department
Then there is a list I want the data from in the Department site.
First I am just trying to get the lists to display and it is not working. Thanks for any tips.
private void FillProvidersDdl()
{
using(SPWeb web = new SPSite("http://sptest.domain.com/Departements"))
{
ddlProviderByName.DataSource = web.Lists["cb63967c-23f9-4257-9968-ac4dc6c1575e"];
ddlProviderByName.DataTextField = "main";
ddlProviderByName.DataBind();
var lists = web.Lists;
//from SPList list in web.Lists
//where list.Hidden == false
//select list;
foreach (SPList list in lists)
{
ltTest.Text = ("<br />" + list.Title);
}
}
}Moojjoo MCP, MCTS
MCP Virtual Business Card
http://moojjoo.blogspot.com