我有这样的形式
@using (Html.BeginForm()) {
@Html.ValidationSummary(true)
<fieldset>
<legend>Course</legend>
@Html.HiddenFor(model => model.CId)
<div class="editor-label">
@Html.LabelFor(model => model.CName)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.CName)
@Html.ValidationMessageFor(model => model.CName)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.Cteator)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Cteator)
@Html.ValidationMessageFor(model => model.Cteator)
</div>
<div class="editor-label">
@Html.LabelFor(model => model.date)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.date)
@Html.ValidationMessageFor(model => model.date)
</div>
<p>
<input type="submit" value="Save" />
</p>
</fieldset>
}
我想在日期字段的字段中插入系统当前日期和时间。我怎样才能做到这一点。模型和控制器已经通过脚手架创建。