diff --git a/src/Microsoft.AspNet.Mvc.TagHelpers/Properties/Resources.Designer.cs b/src/Microsoft.AspNet.Mvc.TagHelpers/Properties/Resources.Designer.cs
index 53da161a39..e167fc52c6 100644
--- a/src/Microsoft.AspNet.Mvc.TagHelpers/Properties/Resources.Designer.cs
+++ b/src/Microsoft.AspNet.Mvc.TagHelpers/Properties/Resources.Designer.cs
@@ -90,22 +90,6 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
return string.Format(CultureInfo.CurrentCulture, GetString("InputTagHelper_ValueRequired"), p0, p1, p2, p3);
}
- ///
- /// Cannot determine body for {0}. '{2}' must be null if '{1}' is null.
- ///
- internal static string SelectTagHelper_CannotDetermineContentWhenOnlyItemsSpecified
- {
- get { return GetString("SelectTagHelper_CannotDetermineContentWhenOnlyItemsSpecified"); }
- }
-
- ///
- /// Cannot determine body for {0}. '{2}' must be null if '{1}' is null.
- ///
- internal static string FormatSelectTagHelper_CannotDetermineContentWhenOnlyItemsSpecified(object p0, object p1, object p2)
- {
- return string.Format(CultureInfo.CurrentCulture, GetString("SelectTagHelper_CannotDetermineContentWhenOnlyItemsSpecified"), p0, p1, p2);
- }
-
///
/// The {2} was unable to provide metadata about '{1}' expression value '{3}' for {0}.
///
diff --git a/src/Microsoft.AspNet.Mvc.TagHelpers/Resources.resx b/src/Microsoft.AspNet.Mvc.TagHelpers/Resources.resx
index 6a35258fbb..1aa82d190f 100644
--- a/src/Microsoft.AspNet.Mvc.TagHelpers/Resources.resx
+++ b/src/Microsoft.AspNet.Mvc.TagHelpers/Resources.resx
@@ -132,9 +132,6 @@
'{1}' must not be null for {0} if '{2}' is '{3}'.
-
- Cannot determine body for {0}. '{2}' must be null if '{1}' is null.
-
The {2} was unable to provide metadata about '{1}' expression value '{3}' for {0}.
diff --git a/src/Microsoft.AspNet.Mvc.TagHelpers/SelectTagHelper.cs b/src/Microsoft.AspNet.Mvc.TagHelpers/SelectTagHelper.cs
index 3b51d0aade..54b9e5077a 100644
--- a/src/Microsoft.AspNet.Mvc.TagHelpers/SelectTagHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.TagHelpers/SelectTagHelper.cs
@@ -14,6 +14,7 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
///
/// implementation targeting <select> elements with an asp-for attribute.
///
+ [TargetElement("select", Attributes = ForAttributeName)]
public class SelectTagHelper : TagHelper
{
private const string ForAttributeName = "asp-for";
@@ -57,63 +58,47 @@ namespace Microsoft.AspNet.Mvc.TagHelpers
///
public override void Process(TagHelperContext context, TagHelperOutput output)
{
- if (For == null)
+ // Note null or empty For.Name is allowed because TemplateInfo.HtmlFieldPrefix may be sufficient.
+ // IHtmlGenerator will enforce name requirements.
+ var metadata = For.Metadata;
+ if (metadata == null)
{
- // Regular HTML element. Just make sure Items wasn't specified.
- if (Items != null)
- {
- var message = Resources.FormatSelectTagHelper_CannotDetermineContentWhenOnlyItemsSpecified(
- "