Prefer `IHtmlHelper` methods elsewhere in our code
- #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
This commit is contained in:
parent
4c5aa15f0b
commit
f4d53a0045
|
|
@ -227,7 +227,11 @@ namespace Microsoft.AspNet.Mvc.Rendering
|
|||
|
||||
// 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");
|
||||
|
|
|
|||
|
|
@ -65,14 +65,14 @@ namespace Microsoft.AspNet.Mvc
|
|||
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; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue