I have a controller located in Controllers folder.
Controllers
.... CustomViewController
The CustomViewController executes the following method
public ActionResult DisplayPerson()
{
Person prn = new Person();
prn.Name = "Rama";
prn.Email = "[email protected]";
return View(prn);
}
I have two views located in CustomView folder
Views
....CustomView
.. DisplayPerson
.. PersonView2
Routing
routes.MapRoute(
"Display",
"{Controller}/{action}/{id}",
new { controller = "CustomView",
action = "DisplayPerson", id = "" }
);
Question :
By default the view "DisplayPerson" is used to display the Person details.What is the way to call the view "PersonView2" inside the "DisplayPerson()" method.