Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Commit

Permalink
Prefer IHtmlHelper methods elsewhere in our code
Browse files Browse the repository at this point in the history
- #847 line 7 sub-bullets
- don't call extension methods from our templates
 - partially addressed in PR #934 (for methods changed there)
- don't reference extension methods from XML comments
  • Loading branch information
dougbu committed Aug 5, 2014
1 parent fd082f0 commit b57406d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,11 @@ public static string ObjectTemplate(IHtmlHelper html)

// TODO: add ModelMetadata.HideSurroundingHtml and use here (skip this block)
{
var label = html.Label(propertyMetadata.PropertyName).ToString();
var label = html.Label(
propertyMetadata.PropertyName,
labelText: null,
htmlAttributes: null)
.ToString();
if (!string.IsNullOrEmpty(label))
{
divTag.AddCssClass("editor-label");
Expand Down
8 changes: 4 additions & 4 deletions src/Microsoft.AspNet.Mvc.Core/ViewContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ public virtual FormContext FormContext
public bool ClientValidationEnabled { get; set; }

/// <summary>
/// Element name used to wrap a top-level message generated by
/// <see cref="HtmlHelperValidationExtensions.ValidationSummary(IHtmlHelper)"/> and other overloads.
/// Element name used to wrap a top-level message generated by <see cref="IHtmlHelper.ValidationSummary"/> and
/// other overloads.
/// </summary>
public string ValidationSummaryMessageElement { get; set; }

/// <summary>
/// Element name used to wrap a top-level message generated by
/// <see cref="HtmlHelperValidationExtensions.ValidationMessage(IHtmlHelper, string)"/> and other overloads.
/// Element name used to wrap a top-level message generated by <see cref="IHtmlHelper.ValidationMessage"/> and
/// other overloads.
/// </summary>
public string ValidationMessageElement { get; set; }

Expand Down

0 comments on commit b57406d

Please sign in to comment.