I want to pass url link like
http://localhost:24873/Jobs/[companyname]
or
http://localhost:24873/[companyname]/Jobs/ (Preferred)
I tried below routing in global aspx file and created controller named Jobs and Index action result with Jobs folder but not working.
routes.MapRoute(
"JobList", // Route name
"Jobs/{companyname}",
new
{
controller = "Jobs",
action = "Index",
companyname = string.Empty
}
);
And my controller:
public partial class JobsController : Controller
{
public ActionResult Index()
{
JobsListModel model = new JobsListModel();
return View(model);
}
}
What I am doing wrong? Please help.