How do I access the following written in View
@Html.HiddenFor(Model=>开发者_C百科;Model.id)
in Controller ?
Thank you
Create a Action method that takes the Type that you used as Model in your view.
[HttpPost]
public ActionResult Create(MyModel model)
{
var id = model.id;//the id in @Html.HiddenFor(Model=>Model.id)
}
精彩评论