I defined a default value in a form that I have in a view (@ Value="afar1793") and I set it disabled so that it could not be modified but when it gets to the controller it becomes null.
I have this in my code:
View:
<div class="form-group">
@Html.LabelFor(model => model.Id_Usuario, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Id_Usuario, Usuario, new { htmlAttributes = new { @Value ="afar1793", @disabled = "disabled", @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Id_Usuario, "", new {@class = "text-danger" })
</div>
</div>
Controller:
public ActionResult Registrar(Usuarios usu)
{
//Codigo
}