You can just add a boolean parameter to your action:
public ActionResult LogIn(string username, string password, bool remember)
{
// You have it
}
Additionally you can use RouteValues["Remember"] to obtain the ValueProviderResult.
So you you can do:
public ActionResult LogIn(string username, string password)
{
bool remember = false;
ValueProviderResult val;
if (RouteValues.TryGetValue(key, out val))
remember = (bool)val.ConvertTo(typeof(bool));
// Now you have it
}
But I prefer the 1st option for obvious reasons.
As for the question:
Is this normal? why is it true,false? what is it now true or false?
Yes it is normal. The checkbox helper in MVC always generates hidden input with value "False". This is needed to provide False value if checkbox is not selected.
Why?
Because of according to W3.ORG the value only gets posted to server if the checkbox IS selected, otherwise it is not (so you don't know if it is True or False, eg is null).
So if you select the checkbox "true,false" comes to the server and you can safely assume the value is true.
If the checkbox is NOT selected the "false" comes to the server and you can be sure it is NOT selected.
To clarify more: the values (according to W3.ORG) with the same name are separated by comma. So it is perfectly fine to have different inputs with the same name within single form (even if the inputs are of different types: checkbox, radio, text, hidden etc).