in asp.net mvc is it possible to register routes somewhere other than application.Start()
- by joe q.
Hi,
is it possible to create and register routes after Application.Start() is called?
let's say have a controller, PersonController. With default routing, URLs could look something like www.site.com/Person/Edit/4, with 'Person' matching the controller.
now imagine I have several users, some may prefer we use the term 'Friends'. I would like to use the same controller, and have /Friends/Edit/4 map to the same controller/action/id. Maybe someone else prefers /Comrades/Edit/4.
with the naming preferences stored in a database, is there a way that I can dynamically create these routes at some point mid-application, after the user has logged in?
thanks!