Question : How to get all the site names under a sitecollection

Hi all,

I need to get the list of all the sites under my site collection and i used the attached code to do this. The code works fine for the all the top level sites. But the SPWebCollection doesnt seem to have the sites under the top level sites.
How can the sites under the  
1:
2:
3:
4:
5:
6:
7:
8:
9:
using (SPWeb oWebsite = new SPSite(requestSiteUrl).OpenWeb())
{
    SPWebCollection collWebsite = oWebsite.Webs;

    foreach (SPWeb subSite in collWebsite)
    {
        DoSomething(subSite.Title);
    }
}

Answer : How to get all the site names under a sitecollection

you seem to want a SUM() and not AVG() also..?
1:
2:
3:
4:
5:
6:
7:
8:
SELECT  t.Account
      , AVG(t.Count) AS AvgCount
      , SUM(t.Count) AS SumCount
      ,(Datename(ww,getdate()) + '  ''' + Datename(yy,getdate())) as Period
 FROM tblHFBYACC t       
 WHERE Datename(Year,getdate()) >= (Datename(Year,getdate()) + (DatePart(ww, getdate()) - 1) - 52)
 GROUP BY  t.Account
Random Solutions  
 
programming4us programming4us