ASP.NET MVC 2 Form Not Passing Values
        Posted  
        
            by Wayne
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Wayne
        
        
        
        Published on 2010-03-12T15:09:51Z
        Indexed on 
            2010/03/12
            17:57 UTC
        
        
        Read the original article
        Hit count: 213
        
asp.net-mvc
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.
© Stack Overflow or respective owner