I just realized that when I place a form tag on my layout page, surrounding the RenderBody section, the unobtrusive validation is not being generated. Something like this:>
You could apply a grotesque hack inside your view:
@{
var originalContext = ViewContext.FormContext;
ViewContext.FormContext = new FormContext();
}
@Html.TextBoxFor(x => x.Prop1)
@Html.ValidationMessageFor(x => x.Prop1)
@Html.TextBoxFor(x => x.Prop2)
@Html.ValidationMessageFor(x => x.Prop2)
@{
ViewContext.FormContext = originalContext;
}