ASP.NET MVC 2 Form Not Passing Values
- by Wayne
Hi, I have a strange problem happening today. I am running the latest version of the MVC V2 framework and have been having no trouble at all - I came in this morning and for some reason values aren't being passed in to actions.
To clarify lets say I have something like this:
<% using (Html.BeginForm("Register", "Registration", FormMethod.Post)) { %>
....
<input type="submit" name="register" id="register" value="Register" />
<% } %>
And in my controller I have the following:
[HttpPost]
public ActionResult Register(RegistrationModel model, string register)
{
// At this point the register string is null
}
This has been working fine for a while now and I have not changed anything that I can think of that would cause this to happen.
Does that make sense and as anyone any idea what is going on or what I have messed up?
Thanks.