i am trying to create route.
Which is
/emlak/TITLE/number.aspx
such as
/emlak/Here_is_your_best_property/123456.aspx
Global.asax:
routes.MapRoute(
"Product",
"{controller}/{deli}/{productId}",
new { controller = "emlak", action = "Index" },
new { productId = UrlParameter.Optional , deli = UrlParameter.Optional }
);
My controller
namespace emrex.Controllers
{
public class EmlakController : Controller
{
//
// GET: /Emlak/
public ActionResult Index(String productId, String deli)
{
return View();
}
}
}
and i am getting next error:
Server Error in '/' Application.
The resource cannot be found.
Thanks for help.