I am working on an ASP.NET MVC application and ran into something strange.
I got two controller actions:
[CustomAuthorize(Roles = SiteRoles.Admin)] public ActionResult Review(int? id) [CustomAuthorize(Roles = SiteRoles.Admin)] [AcceptVerbs(HttpVerbs.Post)] public ActionResult Review(AdReview data)
First, I call the Review action with a null parameter, this will create a web page with a list of elements. Elements are associated with the first Review action with an identifier set.
When an identifier has been provided for verification, an edit web page will be returned for this element. After you click, after some changes we will finish the second action (message). Here the item will be saved.
Everything is still fine.
Now, in the last Review (post) action, I got the following code at the end:
return RedirectToAction("Review", "Ad");
This will trigger the first Review action again, the problem is that it will provide the previous identifier? I thought RedirectToAction would not provide any parameters?
source share