I have a contoller action that a number of forms will post to, all in different views. 开发者_开发知识库Is there a way, in my controller action, to see which view contained the form that posted to it?
I need this to determine to where to redirect the action when the code in the post action is complete. Thank you!
Two options...you can add a field to your form (or query string) that provides the redirect url. Or you can look at the HttpRequest.UrlReferrer field. It will provide you with the full URL which you have to parse to get the original form.
Hope this helps
精彩评论