I use MVC2/asp.net and try to develop something like a wizard. This wizard will have several websites.
The user will be able to enter some information on website A and to navigate then to
website B (by pressing a button which triggers the Http.Post event).
No problem up to this point.
Also on website B can the user enter some information. But there he has two buttons: “Back” and “Forward”.
How to identify here which button was pressed?
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Step2(Model model, FormCollection Form)
{
...
}
The “Back” / “Forward” buttons look like this:
input type=”image” name=”BackButton” id=”BackButton” src=”http://…whatever…/Resources/Images/Button/BackButton.gif” alt=”Back” />
input type=”image” name=”ForwardButton” id=”ForwardButton” src=”http://…whatever…/Resources/Images/Button/Forward.gif” alt=”Forward” />
By looking through
FormCollection Formonly the button that did the postback should be present if I remember correctly.and in mvc2 you can type
[HttpPost]instead of[AcceptVerbs(HttpVerbs.Post)]