I have multiple html helpers. When I click login button I am disabling user_register div using jquery and when I enter details the username and password the model binder is able to bind properly but when I click Register I am disabling user_login div and enabling user_register div and when I enter the details only email and firstname is what the model binder is able to bind and not username, password. Is this becoz I am using the same html helpers more than once. How to handle this. I have the following code
<div class="user_login">
<label>Email / Username</label>
@Html.TextBoxFor(model => model.Email)
<br />
<label>Password</label>
@Html.TextBoxFor(model => model.Password)
<br />
<div class="action_btns">
<div class="one_half"><a href="#" class="btn back_btn"><i class="fa fa-angle-double-left"></i>Back</a>
</div>
<div class="one_half last">
<input type="submit" style="border: none" name="action" class="btn btn_red" value="Login" />
</div>
</div>
<a href="#" class="forgot_password">Forgot password?</a>
</div>
<div class="user_register">
<label>Full Name</label>
@Html.TextBoxFor(model => model.First_Name)<br />
<label>Email Address</label>
@Html.TextBox(model=>model.Email)<br />
<label>User Name</label>
@Html.TextBoxFor(model => model.User_Name)<br />
<label>Password</label>
@Html.TextBox(model=>model.Password") <br />
</div>
The controller follows here
public ActionResult Index(Customer customer, string Action)
{
//something here
}