C# – how to get current URL in SharePoint

asp.netcnetsharepoint-2007visual-studio-2008

I am using SharePiont Server 2007 Enterprise with Windows Server 2008 Enterprise, and I am using publishing portal template. I am developing using VSTS 2008 + C# + .Net 3.5. I am using left navigation area (in SharePoint terms, it is also called current navigation area), and each item in the left navigation area maps to either a sub-site or a specific URL (i.e. clicks the item in left navigation area will display content of welcome page of the specific sub-site or the content of the specific URL in the main content area on the central area).

I want to know which URL is displayed on the main content area when an item in the left navigation area is clicked. Any samples to make a reference?

Best Answer

Are using SharePoint object model in your app?