In your code, in order to refer to the root, all you need to do is put “~/” in the front of your path. I’ve seen many people actually use http:// in order to get to the exact page, but it’s not only not necessary, but overkill.
Let’s say your file is called myFile.aspx and it’s in a folder called ‘myData’, which is in the root. The path to it would be “~/myData/myFile.aspx”
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF