Rookie question. I have a parameter being passed to a create view. I need to set a field name with a default value. @Html.EditorFor(model => model.Id) I need to set this in
Shove it in the ViewBag:
ViewBag
Controller:
ViewBag.ProductId = 1;
View:
@Html.TextBoxFor(c => c.Propertyname, new {@Value = ViewBag.ProductId})