Get parent web not top level
Assuming "site" is your current SPWeb, just look at site.Webs or site.GetSubwebsForCurrentUser (). I believe the former will try to give you all websites even if the current user doesn't have access, so the latter is probably preferable.
Update. Later I realized that your question name states that you want a parent network, whereas your question text states that you want a website. Above is the website. The parent website is simply site.ParentWeb (again, assuming "site" is your SPWeb). You can always check the IsRootWeb property if you want to check this.
Another update. Based on your comment, it looks like the "site" could be SPSite instead of SPWeb. To get the internet you need to do something like site.OpenWeb () (now assuming "site" is SPSite). Your best bet is to do it in C # using the instruction to properly dispose of SPWeb when you're done. Please note that the OpenWeb method cannot accept any parameters, which works great if SPSite was built with the full url of your SPWeb. Or OpenWeb can accept a URL parameter.
source to share