Good day! I can not figure out how to set the default value for the field in the asp.net mvc 4 project. I tried to assign it via:
@Html.EditorFor(model => model.Category, new { @Value = "5" } But nothing happened, tried to add through
int _propertyValue = 5; public int id_Category{ get { return _propertyValue; } set { _propertyValue = value; } } It seems like you can predetermine it through the controller, in the GET block, but it also does not work out. Tell me, please, how can this be realized?