mercredi 8 juillet 2015

I need to take the controller action's name out of the URL, but don't know how

Example: I would like to view a Contract with an ID of 12483, so I would like to use this URL:

/Contract/12483 

I can't do this in ASP.NET MVC because the ASP.NET route exepects /{controller}/{action}/{id} to be able to route to the needed code to handle the request so I would have to do this:

/Contract/View/12483 

This is not RESTful, however.

Anyone know a way around this?

Aucun commentaire:

Enregistrer un commentaire