From 50267881455ce0f6e0f64cc5d3822cd034f140e5 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Wed, 2 Apr 2014 16:12:14 -0700 Subject: [PATCH] Add sample for DisplayForModel Html Helper. Showcased a lot of the core pieces of DisplayFor in the sample. Some pieces are still missing such as DataType handling. The infrastructure is there to handle it in the TemplateRenderer but the model metadata providers do not construct the metadata with the data types. --- .../MvcSample.Web/Views/Shared/DisplayTemplates/User.cshtml | 1 + samples/MvcSample.Web/Views/Shared/MyView.cshtml | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 samples/MvcSample.Web/Views/Shared/DisplayTemplates/User.cshtml diff --git a/samples/MvcSample.Web/Views/Shared/DisplayTemplates/User.cshtml b/samples/MvcSample.Web/Views/Shared/DisplayTemplates/User.cshtml new file mode 100644 index 0000000000..9d77c13628 --- /dev/null +++ b/samples/MvcSample.Web/Views/Shared/DisplayTemplates/User.cshtml @@ -0,0 +1 @@ +

This is the DisplayForModel output. Once default templates are implemented this should go away.

\ No newline at end of file diff --git a/samples/MvcSample.Web/Views/Shared/MyView.cshtml b/samples/MvcSample.Web/Views/Shared/MyView.cshtml index 4541e0251d..c299c1628e 100644 --- a/samples/MvcSample.Web/Views/Shared/MyView.cshtml +++ b/samples/MvcSample.Web/Views/Shared/MyView.cshtml @@ -315,4 +315,8 @@ +
+ @Html.DisplayForModel() +
+ \ No newline at end of file