diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs
index b10421fb8f..5cd4d9a0c7 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs
@@ -126,7 +126,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// If the object is already an instance, then it is
/// returned as-is.
///
- /// new { property_name = "value" } will translate to the entry { "property_name" , "value" }
+ /// new { data_name="value" } will translate to the entry { "data_name", "value" }
/// in the resulting dictionary.
///
///
@@ -144,7 +144,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// If the object is already an instance, then it is
/// returned as-is.
///
- /// new { data_name="value" } will translate to the entry { "data-name" , "value" }
+ /// new { data_name="value" } will translate to the entry { "data-name", "value" }
/// in the resulting dictionary.
///
///
@@ -633,16 +633,21 @@ namespace Microsoft.AspNet.Mvc.Rendering
///
/// The name of the action method.
/// The name of the controller.
- /// An object that contains the parameters for a route. The parameters are retrieved
- /// through reflection by examining the properties of the object. This object is typically created using object
- /// initializer syntax. Alternatively, an instance containing the
- /// route parameters.
+ ///
+ /// An that contains the parameters for a route. The parameters are retrieved through
+ /// reflection by examining the properties of the . This is typically
+ /// created using initializer syntax. Alternatively, an
+ /// instance containing the route parameters.
+ ///
/// The HTTP method for processing the form, either GET or POST.
/// An instance containing HTML
/// attributes to set for the element.
///
/// An instance which emits the </form> end tag when disposed.
///
+ ///
+ /// In this context, "renders" means the method writes its output using .
+ ///
protected virtual MvcForm GenerateForm(string actionName, string controllerName, object routeValues,
FormMethod method, IDictionary htmlAttributes)
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayExtensions.cs
index c1a8055b19..ccac3b81b7 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayExtensions.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayExtensions.cs
@@ -6,13 +6,62 @@ using System.Linq.Expressions;
namespace Microsoft.AspNet.Mvc.Rendering
{
+ ///
+ /// Display-related extensions for and .
+ ///
public static class HtmlHelperDisplayExtensions
{
+ ///
+ /// Returns HTML markup for the , using a display template. The template is found
+ /// using the 's .
+ ///
+ /// The instance this method extends.
+ ///
+ /// Expression name, relative to the current model. May identify a single property or an
+ /// that contains the properties to display.
+ ///
+ /// A new containing the created HTML.
+ ///
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// 's value.
+ ///
+ ///
+ /// Example s include string.Empty which identifies the current model and
+ /// "prop" which identifies the current model's "prop" property.
+ ///
+ ///
public static HtmlString Display([NotNull] this IHtmlHelper html, string expression)
{
return html.Display(expression, templateName: null, htmlFieldName: null, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the , using a display template and specified
+ /// additional view data. The template is found using the 's
+ /// .
+ ///
+ /// The instance this method extends.
+ ///
+ /// Expression name, relative to the current model. May identify a single property or an
+ /// that contains the properties to display.
+ ///
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// A new containing the created HTML.
+ ///
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// 's value.
+ ///
+ ///
+ /// Example s include string.Empty which identifies the current model and
+ /// "prop" which identifies the current model's "prop" property.
+ ///
+ ///
public static HtmlString Display(
[NotNull] this IHtmlHelper html,
string expression,
@@ -22,6 +71,28 @@ namespace Microsoft.AspNet.Mvc.Rendering
additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the , using a display template. The template is found
+ /// using the or the 's
+ /// .
+ ///
+ /// The instance this method extends.
+ ///
+ /// Expression name, relative to the current model. May identify a single property or an
+ /// that contains the properties to display.
+ ///
+ /// The name of the template used to create the HTML markup.
+ /// A new containing the created HTML.
+ ///
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// 's value.
+ ///
+ ///
+ /// Example s include string.Empty which identifies the current model and
+ /// "prop" which identifies the current model's "prop" property.
+ ///
+ ///
public static HtmlString Display(
[NotNull] this IHtmlHelper html,
string expression,
@@ -30,6 +101,33 @@ namespace Microsoft.AspNet.Mvc.Rendering
return html.Display(expression, templateName, htmlFieldName: null, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the , using a display template and specified
+ /// additional view data. The template is found using the or the
+ /// 's .
+ ///
+ /// The instance this method extends.
+ ///
+ /// Expression name, relative to the current model. May identify a single property or an
+ /// that contains the properties to display.
+ ///
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// A new containing the created HTML.
+ ///
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// 's value.
+ ///
+ ///
+ /// Example s include string.Empty which identifies the current model and
+ /// "prop" which identifies the current model's "prop" property.
+ ///
+ ///
public static HtmlString Display(
[NotNull] this IHtmlHelper html,
string expression,
@@ -39,6 +137,32 @@ namespace Microsoft.AspNet.Mvc.Rendering
return html.Display(expression, templateName, htmlFieldName: null, additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the , using a display template and specified HTML
+ /// field name. The template is found using the or the
+ /// 's.
+ ///
+ /// The instance this method extends.
+ ///
+ /// Expression name, relative to the current model. May identify a single property or an
+ /// that contains the properties to display.
+ ///
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// A used to disambiguate the names of HTML elements that are created for
+ /// properties that have the same name.
+ ///
+ /// A new containing the created HTML.
+ ///
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// 's value.
+ ///
+ ///
+ /// Example s include string.Empty which identifies the current model and
+ /// "prop" which identifies the current model's "prop" property.
+ ///
+ ///
public static HtmlString Display(
[NotNull] this IHtmlHelper html,
string expression,
@@ -48,6 +172,19 @@ namespace Microsoft.AspNet.Mvc.Rendering
return html.Display(expression, templateName, htmlFieldName, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the , using a display template. The template is found
+ /// using the 's .
+ ///
+ /// The instance this method extends.
+ /// An expression to be evaluated against the current model.
+ /// The type of the model.
+ /// The type of the result.
+ /// A new containing the created HTML.
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// result.
+ ///
public static HtmlString DisplayFor([NotNull] this IHtmlHelper html,
[NotNull] Expression> expression)
{
@@ -55,6 +192,25 @@ namespace Microsoft.AspNet.Mvc.Rendering
additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the , using a display template and specified
+ /// additional view data. The template is found using the 's
+ /// .
+ ///
+ /// The instance this method extends.
+ /// An expression to be evaluated against the current model.
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// The type of the model.
+ /// The type of the result.
+ /// A new containing the created HTML.
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// result.
+ ///
public static HtmlString DisplayFor([NotNull] this IHtmlHelper html,
[NotNull] Expression> expression,
object additionalViewData)
@@ -63,6 +219,21 @@ namespace Microsoft.AspNet.Mvc.Rendering
additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the , using a display template. The template is found
+ /// using the or the 's
+ /// .
+ ///
+ /// The instance this method extends.
+ /// An expression to be evaluated against the current model.
+ /// The name of the template used to create the HTML markup.
+ /// The type of the model.
+ /// The type of the result.
+ /// A new containing the created HTML.
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// result.
+ ///
public static HtmlString DisplayFor([NotNull] this IHtmlHelper html,
[NotNull] Expression> expression,
string templateName)
@@ -70,6 +241,26 @@ namespace Microsoft.AspNet.Mvc.Rendering
return html.DisplayFor(expression, templateName, htmlFieldName: null, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the , using a display template and specified
+ /// additional view data. The template is found using the or the
+ /// 's .
+ ///
+ /// The instance this method extends.
+ /// An expression to be evaluated against the current model.
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// The type of the model.
+ /// The type of the result.
+ /// A new containing the created HTML.
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// result.
+ ///
public static HtmlString DisplayFor([NotNull] this IHtmlHelper html,
[NotNull] Expression> expression,
string templateName,
@@ -79,6 +270,25 @@ namespace Microsoft.AspNet.Mvc.Rendering
additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the , using a display template and specified HTML
+ /// field name. The template is found using the or the
+ /// 's .
+ ///
+ /// The instance this method extends.
+ /// An expression to be evaluated against the current model.
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// A used to disambiguate the names of HTML elements that are created for properties
+ /// that have the same name.
+ ///
+ /// The type of the model.
+ /// The type of the result.
+ /// A new containing the created HTML.
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// result.
+ ///
public static HtmlString DisplayFor([NotNull] this IHtmlHelper html,
[NotNull] Expression> expression,
string templateName,
@@ -88,23 +298,76 @@ namespace Microsoft.AspNet.Mvc.Rendering
additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the current model, using a display template. The template is found using the
+ /// model's .
+ ///
+ /// The instance this method extends.
+ /// A new containing the created HTML.
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// current model.
+ ///
public static HtmlString DisplayForModel([NotNull] this IHtmlHelper html)
{
return html.Display(expression: null, templateName: null, htmlFieldName: null, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the current model, using a display template and specified additional view data. The
+ /// template is found using the model's .
+ ///
+ /// The instance this method extends.
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// A new containing the created HTML.
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// current model.
+ ///
public static HtmlString DisplayForModel([NotNull] this IHtmlHelper html, object additionalViewData)
{
return html.Display(expression: null, templateName: null, htmlFieldName: null,
additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the current model, using a display template. The template is found using the
+ /// or the model's .
+ ///
+ /// The instance this method extends.
+ /// The name of the template used to create the HTML markup.
+ /// A new containing the created HTML.
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// current model.
+ ///
public static HtmlString DisplayForModel([NotNull] this IHtmlHelper html, string templateName)
{
return html.Display(expression: null, templateName: templateName, htmlFieldName: null,
additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the current model, using a display template and specified additional view data. The
+ /// template is found using the or the model's
+ /// .
+ ///
+ /// The instance this method extends.
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// A new containing the created HTML.
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// current model.
+ ///
public static HtmlString DisplayForModel(
[NotNull] this IHtmlHelper html,
string templateName,
@@ -114,6 +377,22 @@ namespace Microsoft.AspNet.Mvc.Rendering
additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the current model, using a display template and specified HTML field name. The
+ /// template is found using the or the model's
+ /// .
+ ///
+ /// The instance this method extends.
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// A used to disambiguate the names of HTML elements that are created for
+ /// properties that have the same name.
+ ///
+ /// A new containing the created HTML.
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// current model.
+ ///
public static HtmlString DisplayForModel(
[NotNull] this IHtmlHelper html,
string templateName,
@@ -123,6 +402,27 @@ namespace Microsoft.AspNet.Mvc.Rendering
additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the current model, using a display template, specified HTML field name, and
+ /// additional view data. The template is found using the or the model's
+ /// .
+ ///
+ /// The instance this method extends.
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// A used to disambiguate the names of HTML elements that are created for
+ /// properties that have the same name.
+ ///
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// A new containing the created HTML.
+ ///
+ /// For example the default display template includes markup for each property in the
+ /// current model.
+ ///
public static HtmlString DisplayForModel(
[NotNull] this IHtmlHelper html,
string templateName,
diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs
index aead4fcb00..201df16063 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs
@@ -29,7 +29,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
///
/// The instance this method extends.
///
- /// The expression to be evaluated against an item in the current model.
+ /// An expression to be evaluated against an item in the current model.
/// The type of items in the model collection.
/// The type of the result.
/// A containing the display name.
diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperEditorExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperEditorExtensions.cs
index e4911c9ad6..16bb253ec5 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperEditorExtensions.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperEditorExtensions.cs
@@ -6,42 +6,198 @@ using System.Linq.Expressions;
namespace Microsoft.AspNet.Mvc.Rendering
{
+ ///
+ /// Editor-related extensions for and .
+ ///
public static class HtmlHelperEditorExtensions
{
+ ///
+ /// Returns HTML markup for the , using an editor template. The template is found
+ /// using the 's .
+ ///
+ /// The instance this method extends.
+ ///
+ /// Expression name, relative to the current model. May identify a single property or an
+ /// that contains the properties to edit.
+ ///
+ /// A new containing the <input> element(s).
+ ///
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the 's value.
+ ///
+ ///
+ /// Example s include string.Empty which identifies the current model and
+ /// "prop" which identifies the current model's "prop" property.
+ ///
+ ///
public static HtmlString Editor([NotNull] this IHtmlHelper html, string expression)
{
return html.Editor(expression, templateName: null, htmlFieldName: null, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the , using an editor template and specified
+ /// additional view data. The template is found using the 's
+ /// .
+ ///
+ /// The instance this method extends.
+ ///
+ /// Expression name, relative to the current model. May identify a single property or an
+ /// that contains the properties to edit.
+ ///
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// A new containing the <input> element(s).
+ ///
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the 's value.
+ ///
+ ///
+ /// Example s include string.Empty which identifies the current model and
+ /// "prop" which identifies the current model's "prop" property.
+ ///
+ ///
public static HtmlString Editor([NotNull] this IHtmlHelper html, string expression, object additionalViewData)
{
return html.Editor(expression, templateName: null, htmlFieldName: null,
additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the , using an editor template. The template is found
+ /// using the or the 's
+ /// .
+ ///
+ /// The instance this method extends.
+ ///
+ /// Expression name, relative to the current model. May identify a single property or an
+ /// that contains the properties to edit.
+ ///
+ /// The name of the template used to create the HTML markup.
+ /// A new containing the <input> element(s).
+ ///
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the 's value.
+ ///
+ ///
+ /// Example s include string.Empty which identifies the current model and
+ /// "prop" which identifies the current model's "prop" property.
+ ///
+ ///
public static HtmlString Editor([NotNull] this IHtmlHelper html, string expression, string templateName)
{
return html.Editor(expression, templateName, htmlFieldName: null, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the , using an editor template and specified
+ /// additional view data. The template is found using the or the
+ /// 's .
+ ///
+ /// The instance this method extends.
+ ///
+ /// Expression name, relative to the current model. May identify a single property or an
+ /// that contains the properties to edit.
+ ///
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// A new containing the <input> element(s).
+ ///
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the 's value.
+ ///
+ ///
+ /// Example s include string.Empty which identifies the current model and
+ /// "prop" which identifies the current model's "prop" property.
+ ///
+ ///
public static HtmlString Editor([NotNull] this IHtmlHelper html, string expression, string templateName,
object additionalViewData)
{
return html.Editor(expression, templateName, htmlFieldName: null, additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the , using an editor template and specified HTML
+ /// field name. The template is found using the or the
+ /// 's .
+ ///
+ /// The instance this method extends.
+ ///
+ /// Expression name, relative to the current model. May identify a single property or an
+ /// that contains the properties to edit.
+ ///
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// A used to disambiguate the names of HTML elements that are created for
+ /// properties that have the same name.
+ ///
+ /// A new containing the <input> element(s).
+ ///
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the 's value.
+ ///
+ ///
+ /// Example s include string.Empty which identifies the current model and
+ /// "prop" which identifies the current model's "prop" property.
+ ///
+ ///
public static HtmlString Editor([NotNull] this IHtmlHelper html, string expression, string templateName,
string htmlFieldName)
{
return html.Editor(expression, templateName, htmlFieldName, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the , using an editor template. The template is found
+ /// using the 's .
+ ///
+ /// The instance this method extends.
+ /// An expression to be evaluated against the current model.
+ /// The type of the model.
+ /// The type of the result.
+ /// A new containing the <input> element(s).
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the result.
+ ///
public static HtmlString EditorFor([NotNull] this IHtmlHelper html,
[NotNull] Expression> expression)
{
return html.EditorFor(expression, templateName: null, htmlFieldName: null, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the , using an editor template and specified
+ /// additional view data. The template is found using the 's
+ /// .
+ ///
+ /// The instance this method extends.
+ /// An expression to be evaluated against the current model.
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// The type of the model.
+ /// The type of the result.
+ /// A new containing the <input> element(s).
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the result.
+ ///
public static HtmlString EditorFor([NotNull] this IHtmlHelper html,
[NotNull] Expression> expression, object additionalViewData)
{
@@ -49,12 +205,47 @@ namespace Microsoft.AspNet.Mvc.Rendering
additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the , using an editor template. The template is found
+ /// using the or the 's
+ /// .
+ ///
+ /// The instance this method extends.
+ /// An expression to be evaluated against the current model.
+ /// The name of the template that is used to create the HTML markup.
+ /// The type of the model.
+ /// The type of the result.
+ /// A new containing the <input> element(s).
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the result.
+ ///
public static HtmlString EditorFor([NotNull] this IHtmlHelper html,
[NotNull] Expression> expression, string templateName)
{
return html.EditorFor(expression, templateName, htmlFieldName: null, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the , using an editor template and specified
+ /// additional view data. The template is found using the or the
+ /// 's .
+ ///
+ /// The instance this method extends.
+ /// An expression to be evaluated against the current model.
+ /// The name of the template that is used to create the HTML markup.
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// The type of the model.
+ /// The type of the result.
+ /// A new containing the <input> element(s).
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the result.
+ ///
public static HtmlString EditorFor([NotNull] this IHtmlHelper html,
[NotNull] Expression> expression, string templateName, object additionalViewData)
{
@@ -62,29 +253,101 @@ namespace Microsoft.AspNet.Mvc.Rendering
additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the , using an editor template and specified HTML
+ /// field name. The template is found using the or the
+ /// 's .
+ ///
+ /// The instance this method extends.
+ /// An expression to be evaluated against the current model.
+ /// The name of the template that is used to create the HTML markup.
+ ///
+ /// A used to disambiguate the names of HTML elements that are created for properties
+ /// that have the same name.
+ ///
+ /// The type of the model.
+ /// The type of the result.
+ /// A new containing the <input> element(s).
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the result.
+ ///
public static HtmlString EditorFor([NotNull] this IHtmlHelper html,
[NotNull] Expression> expression, string templateName, string htmlFieldName)
{
return html.EditorFor(expression, templateName, htmlFieldName, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the current model, using an editor template. The template is found using the
+ /// model's .
+ ///
+ /// The instance this method extends.
+ /// A new containing the <input> element(s).
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the result.
+ ///
public static HtmlString EditorForModel([NotNull] this IHtmlHelper html)
{
return html.Editor(expression: null, templateName: null, htmlFieldName: null, additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the current model, using an editor template and specified additional view data. The
+ /// template is found using the model's .
+ ///
+ /// The instance this method extends.
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// A new containing the <input> element(s).
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the current model.
+ ///
public static HtmlString EditorForModel([NotNull] this IHtmlHelper html, object additionalViewData)
{
return html.Editor(expression: null, templateName: null, htmlFieldName: null,
additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the current model, using an editor template. The template is found using the
+ /// or the model's .
+ ///
+ /// The instance this method extends.
+ /// The name of the template used to create the HTML markup.
+ /// A new containing the <input> element(s).
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the current model.
+ ///
public static HtmlString EditorForModel([NotNull] this IHtmlHelper html, string templateName)
{
return html.Editor(expression: null, templateName: templateName, htmlFieldName: null,
additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the current model, using an editor template and specified additional view data. The
+ /// template is found using the or the model's
+ /// .
+ ///
+ /// The instance this method extends.
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// A new containing the <input> element(s).
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the current model.
+ ///
public static HtmlString EditorForModel([NotNull] this IHtmlHelper html, string templateName,
object additionalViewData)
{
@@ -92,6 +355,22 @@ namespace Microsoft.AspNet.Mvc.Rendering
additionalViewData: additionalViewData);
}
+ ///
+ /// Returns HTML markup for the current model, using an editor template and specified HTML field name. The
+ /// template is found using the or the model's
+ /// .
+ ///
+ /// The instance this method extends.
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// A used to disambiguate the names of HTML elements that are created for
+ /// properties that have the same name.
+ ///
+ /// A new containing the <input> element(s).
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the current model.
+ ///
public static HtmlString EditorForModel([NotNull] this IHtmlHelper html, string templateName,
string htmlFieldName)
{
@@ -99,6 +378,27 @@ namespace Microsoft.AspNet.Mvc.Rendering
additionalViewData: null);
}
+ ///
+ /// Returns HTML markup for the current model, using an editor template, specified HTML field name, and
+ /// additional view data. The template is found using the or the model's
+ /// .
+ ///
+ /// The instance this method extends.
+ /// The name of the template used to create the HTML markup.
+ ///
+ /// A used to disambiguate the names of HTML elements that are created for
+ /// properties that have the same name.
+ ///
+ ///
+ /// An anonymous or
+ /// that can contain additional view data that will be merged into the
+ /// instance created for the template.
+ ///
+ /// A new containing the <input> element(s).
+ ///
+ /// For example the default editor template includes <label> and <input>
+ /// elements for each property in the current model.
+ ///
public static HtmlString EditorForModel([NotNull] this IHtmlHelper html, string templateName,
string htmlFieldName, object additionalViewData)
{
diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperFormExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperFormExtensions.cs
index 7afcba095d..fbfda8af2a 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperFormExtensions.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperFormExtensions.cs
@@ -3,8 +3,23 @@
namespace Microsoft.AspNet.Mvc.Rendering
{
+ ///
+ /// DisplayName-related extensions for .
+ ///
public static class HtmlHelperFormExtensions
{
+ ///
+ /// Renders a <form> start tag to the response. When the user submits the form,
+ /// the request will be processed by same action. That is the rendered URL will match the current
+ /// request.
+ ///
+ /// The instance this method extends.
+ ///
+ /// An instance which renders the </form> end tag when disposed.
+ ///
+ ///
+ /// In this context, "renders" means the method writes its output using .
+ ///
public static MvcForm BeginForm([NotNull] this IHtmlHelper htmlHelper)
{
// Generates