I have a create action in my controller for HttpPost. inside this action, I insert a record in db, and then return the view defining a different action name, because I want to take the user to another place, for example, in the details view of the newly created record, and I pass to the current model, so I do not need to re upload the data they just entered. Unfortunately, the URL in the address bar still shows the original create action.
[HttpPost] public ActionResult Create(MyModel model) {
How to get the url to show " http: // myapp / MyController / Details / 1 " instead of " http: // myapp / MyController / Create / 1 "? Is it possible, or do I need to do a redirect? I hope I can avoid the redirect ...
asp.net-mvc asp.net-mvc-routing asp.net-mvc-2
Jeremy
source share