I have this model:
public class DefinitionListModel : List<DefinitionListItemModel> { }
Then I have this template setting (partial view) for it in DisplayTemplates:
@model Company.Product.Models.DefinitionListModel <dl> @foreach (var definition in Model) { Html.DisplayFor(m => definition); } </dl>
What causes this default display template because each element is a DefinitionListItemModel :
@model Company.Product.Models.DefinitionListItemModel @Html.DisplayFor(m => m.Term, "DefinitionTerm"); @Html.DisplayFor(m => m.Description, "DefinitionDescription");
And the DefinitionTerm template is as follows:
@model object @{ if (Model != null) { string s = Model as string; if (s != null) { <dt>@s</dt> } else { // Other types and models that could be used. // Last resort. <dt>@Model.ToString()</dt> } } }
The breakpoint located in the last template has been successfully deleted, and the presentation and layout are displayed only in order, but none of them display, even the DL tag from the first template above.
Why does it hit breakpoints but doesn't display HTML?
asp.net-mvc razor asp.net-mvc-5
Luke Puplett Apr 24 '14 at 19:44 2014-04-24 19:44
source share