Reporter | Alex Berezoutsky (fergard) |
---|---|
Created | Feb 13, 2012 3:29:06 PM |
Updated | Feb 13, 2012 3:41:46 PM |
Priority | Critical |
Type | Bug |
Fix versions | Next |
State | Submitted |
Assignee | Dmitry Osinovsky (Dmitry.Osinovsky) |
Subsystem | No subsystem |
Affected versions | 6.1.1 |
Fixed in build | No Fixed in build |
Please consider the Razor view below. ReSharper marks SelectListItem with a green underline and reports 'Validation (XHTML5) element 'selectlistitem' is not supported'.
@model dynamic @{ var itemsKey = (string) ViewData.ModelMetadata.AdditionalValues["UIHint_ControlParameter_Items"]; var items = (IEnumerable<SelectListItem>) ViewContext.ViewData[itemsKey]; var selectedItem = items.FirstOrDefault(si => String.Equals(si.Value, Model)); } @if (selectedItem == null) { @ViewData.ModelMetadata.NullDisplayText } else { @selectedItem.Text }