I am working on a ASP.NET MVC application and have ran in to a strange thing.
I got two controller actions like this:
[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 null as parameter, this will bring up a webpage with a list of items. The items is linked back to the first Review action with the id set.
When the id have been provided to the review action a edit webpage will be returned for this item. When hitting submit after some changes we will end up on the second Review action (post). Here the item will be saved.
Everything fine so far.
Now, in the last Review action(post) 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 id? My thought was that RedirectToAction will not provide any parameters?