I have a bigger project with about 9 controllers. Now at the end of the project the url requeirement change. How to deal best with this situation – renaming the controllers seems just too cumbersome … I need to change all links in servercode and javascript
Share
Your problem can be solved by changing your existing routes. In your global.asax you’ll find a code fragment like this
That maps an URL ‘/Controller/Action/Id’ to Controller, Action and Id. You can provide routes like this
to route requests to /SomeChangedURLBase… to be handled by Controller.
Be aware that these routes should be registered before the default route to avoid that links generated in views point to the default route and generate the old URL.