Click here to Skip to main content
15,891,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a menu control and a "xmldatasource" in a master page and a ".XSL" file for binding data.
I am retrieving "url" from database and bind the data dynamically. I am using a login page which doesn't inherit the Master page.I have a index page which is redirected from login page and it inherits master page but the url of this page doesn't store in database.Index page doesn,t give any error and comes with master page but when I click any menu item it throws exception "cannot use a leading...to exit above the top directory"
Please solve the problem.
Posted

What this means is that your web page is referring to content which is in the folder one level up from your page, but your page is already in the website's root folder, so the relative path is invalid.

It's probably due to using "~/something", probably on a Hyperlink control.
When the physical file is at a different directory level from the friendly URL, ASP.NET uses too many ../'s in the relative URL that it generates, giving this error.

If you can't just use an absolute URL instead, I believe that you can use Page.ResolveUrl("~/foo/bar") to get the proper relative URL.
 
Share this answer
 
Comments
Mousumi2708 25-Jan-12 1:29am    
Thanks Tadit...
My pleasure....
Anytime Mousumi.....
 
Share this answer
 
Comments
Mousumi2708 25-Jan-12 1:35am    
thanks NandaKumer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900