I have some POST actions on my controller that are hit from a pair of GET actions. When validation fails, I want to render the view of the action that the POST is coming from. For example:
~/accounts POSTs to ~/accounts/disable - render "index" view on validation error ~/accounts/profile POSTs to ~/accounts/disable - render "profile" view on validation error
I can get the referer (sic) out of server-variables and parse it to figure out the action, but was hoping there would either be something built in that does what I want, or someone else has already done this that I could crib from.
It seems the ControllerContext.RouteData property only has information about the current request, not the refering (sic) request...?
I'm on ASP.NET MVC beta.