I want to create a URL similar to: localhost:port/farm/animals/cow.cshtml. How do I create a controller for pages behind /animals/ ?
If I create a standard:
public class FarmController : Controller
{
//
// GET: /Farm/
public ActionResult Cow()
{
return View();
}
}
I will not get there because the cow.cshtml is behind the animals. Nor will I get to cow.cshtml with the following code:
public class AnimalsController : Controller
{
//
// GET: /Animals/
public ActionResult Cow()
{
return View();
}
}
Because the link to cow.cshtml is not /animals/ but /farm/animals/cow.
How can I solve this issue?
