Just getting started with MVC.
I have a model and have created a metadata class for persistent data annotations. Some of them work and some don't.
As you can see from the screen shot, the JobNo displayName isn't working, but the VersionRef is. Can't figure out why.
Anyone got any ideas? main difference is that Jobno from a related table
After some more investigation, it seems that for some reason the scaffolded .cshtml contains a literal string for any fields that from related tables.
<div class="form-horizontal">
<h4>Job</h4>
<hr />
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(model => model.JobNo, "JobNo", htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.DropDownList("JobNo", null, htmlAttributes: new { @class = "form-control" })
@Html.ValidationMessageFor(model => model.JobNo, "", new { @class = "text-danger" })
</div>
</div>
Is there a raeson for this?
Regards
mark
After some more investigation, it seems that for some reason the scaffolded .cshtml contains a literal string for any fields that from related tables.