Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-288273: Generic type argument confused with HTML element

$
0
0
Reporter Alex Berezoutsky (fergard) 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
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>