I have created a Site Named Application Test. In this site i again Create a Sub site Named Sub Application I add in site url "http://SP2010:2222/" in Visual Studio Project Project Scope is Site Now i when i try to access the List(TestList) From Sub site(Sub Application) it give error List Does not Exist. Following Code to Access the List(TestList):
using (SPSite sites = new SPSite(SPContext.Current.Site.Url))
{
using (SPWeb web = sites.OpenWeb())
{
SPList CurrentList = web.Lists["TestList"]; // Error comes here
}
}
anybody have solution?

