My url routing is working properly inside “Areas” folder, that means i can go to any controller or view from one to another, how can i come out of this Area controller to Parent Controller?
For Ex: in my controller if i give this line it is coming out of Area controller and working properly
//Homecontroller.cs inside Controllers folder
return RedirectToAction("../../Home");
What is the proper way of coding to come out and connect to parent controller?
You need to specify the area explicitly. Area is a routing parameter, just like controller and action. If you don’t specify it explicitly when generating a URL (i.e. when calling RedirectToAction) the current value is assumed. Which is the area of the current controller.
For example:
To return to a top-level controller clear the area like so: