View Source
Class HtmlHelperRenderExtensions
HtmlHelper extensions for use in templates
Inheritance
System.Object
Assembly: Umbraco.Web.Website.dll
Syntax
public static class HtmlHelperRenderExtensions
Methods
View Source
ActionLink(IHtmlHelper, String, Type)
Returns the result of a child action of a SurfaceController
Declaration
public static IHtmlContent ActionLink(this IHtmlHelper htmlHelper, string actionName, Type surfaceType)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
htmlHelper |
|
System.String |
actionName |
|
Type |
surfaceType |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
ActionLink<T>(IHtmlHelper, String)
Returns the result of a child action of a strongly typed SurfaceController
Declaration
public static IHtmlContent ActionLink<T>(this IHtmlHelper htmlHelper, string actionName)
where T : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
htmlHelper |
|
System.String |
actionName |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
Type Parameters
View Source
AreaPartial(IHtmlHelper, String, String, Object, ViewDataDictionary)
Renders a partial view that is found in the specified area
Declaration
public static IHtmlContent AreaPartial(this IHtmlHelper helper, string partial, string area, object model = null, ViewDataDictionary viewData = null)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
System.String |
partial |
|
System.String |
area |
|
System.Object |
model |
|
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary |
viewData |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline against a locally declared controller
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline against a locally declared
controller.
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
The HTML helper.
|
System.String |
action |
Name of the action.
|
System.String |
controllerName |
Name of the controller.
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
The method.
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
the Microsoft.AspNetCore.Mvc.Rendering.MvcForm
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline against a locally declared controller
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, object additionalRouteVals = null)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.Object |
additionalRouteVals |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline against a locally declared controller
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, object additionalRouteVals, IDictionary<string, object> htmlAttributes)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.Object |
additionalRouteVals |
|
IDictionary<System.String, System.Object> |
htmlAttributes |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline against a locally declared controller
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, object additionalRouteVals, IDictionary<string, object> htmlAttributes, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.Object |
additionalRouteVals |
|
IDictionary<System.String, System.Object> |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline against a locally declared controller
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, object additionalRouteVals, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.Object |
additionalRouteVals |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline against a locally declared controller
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, object additionalRouteVals, bool? antiforgery, IDictionary<string, object> htmlAttributes, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.Object |
additionalRouteVals |
|
System.Nullable<System.Boolean> |
antiforgery |
|
IDictionary<System.String, System.Object> |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline against a locally declared controller
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, object additionalRouteVals, object htmlAttributes)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.Object |
additionalRouteVals |
|
System.Object |
htmlAttributes |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline against a locally declared controller
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, object additionalRouteVals, object htmlAttributes, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.Object |
additionalRouteVals |
|
System.Object |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, string area)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.String |
area |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, string area, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.String |
area |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, string area, object additionalRouteVals, IDictionary<string, object> htmlAttributes)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.String |
area |
|
System.Object |
additionalRouteVals |
|
IDictionary<System.String, System.Object> |
htmlAttributes |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, string area, object additionalRouteVals, IDictionary<string, object> htmlAttributes, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.String |
area |
|
System.Object |
additionalRouteVals |
|
IDictionary<System.String, System.Object> |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, string controllerName, string area, object additionalRouteVals, bool? antiforgery, IDictionary<string, object> htmlAttributes, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.String |
controllerName |
|
System.String |
area |
|
System.Object |
additionalRouteVals |
|
System.Nullable<System.Boolean> |
antiforgery |
|
IDictionary<System.String, System.Object> |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, Type surfaceType)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Type |
surfaceType |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, Type surfaceType, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Type |
surfaceType |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, Type surfaceType, object additionalRouteVals = null)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Type |
surfaceType |
|
System.Object |
additionalRouteVals |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, Type surfaceType, object additionalRouteVals, IDictionary<string, object> htmlAttributes)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Type |
surfaceType |
|
System.Object |
additionalRouteVals |
|
IDictionary<System.String, System.Object> |
htmlAttributes |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, Type surfaceType, object additionalRouteVals, IDictionary<string, object> htmlAttributes, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Type |
surfaceType |
|
System.Object |
additionalRouteVals |
|
IDictionary<System.String, System.Object> |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, Type surfaceType, object additionalRouteVals, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Type |
surfaceType |
|
System.Object |
additionalRouteVals |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, Type surfaceType, object additionalRouteVals, bool? antiforgery, IDictionary<string, object> htmlAttributes, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Type |
surfaceType |
|
System.Object |
additionalRouteVals |
|
System.Nullable<System.Boolean> |
antiforgery |
|
IDictionary<System.String, System.Object> |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, Type surfaceType, object additionalRouteVals, object htmlAttributes)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Type |
surfaceType |
|
System.Object |
additionalRouteVals |
|
System.Object |
htmlAttributes |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, Type surfaceType, object additionalRouteVals, object htmlAttributes, FormMethod method)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Type |
surfaceType |
|
System.Object |
additionalRouteVals |
|
System.Object |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm(this IHtmlHelper html, string action, Type surfaceType, object additionalRouteVals, object htmlAttributes, FormMethod method, bool? antiforgery)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Type |
surfaceType |
|
System.Object |
additionalRouteVals |
|
System.Object |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
System.Nullable<System.Boolean> |
antiforgery |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm<T>(this IHtmlHelper html, string action)
where T : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
Type Parameters
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm<T>(this IHtmlHelper html, string action, FormMethod method)
where T : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
Type Parameters
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm<T>(this IHtmlHelper html, string action, FormMethod method, bool? antiforgery)
where T : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
System.Nullable<System.Boolean> |
antiforgery |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
Type Parameters
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm<T>(this IHtmlHelper html, string action, object additionalRouteVals = null)
where T : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.Object |
additionalRouteVals |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
Type Parameters
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm<T>(this IHtmlHelper html, string action, object additionalRouteVals, IDictionary<string, object> htmlAttributes)
where T : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.Object |
additionalRouteVals |
|
IDictionary<System.String, System.Object> |
htmlAttributes |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
Type Parameters
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm<T>(this IHtmlHelper html, string action, object additionalRouteVals, IDictionary<string, object> htmlAttributes, FormMethod method)
where T : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.Object |
additionalRouteVals |
|
IDictionary<System.String, System.Object> |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
Type Parameters
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm<T>(this IHtmlHelper html, string action, object additionalRouteVals, FormMethod method)
where T : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.Object |
additionalRouteVals |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
Type Parameters
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm<T>(this IHtmlHelper html, string action, object additionalRouteVals, object htmlAttributes)
where T : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.Object |
additionalRouteVals |
|
System.Object |
htmlAttributes |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
Type Parameters
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm<T>(this IHtmlHelper html, string action, object additionalRouteVals, object htmlAttributes, FormMethod method)
where T : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.Object |
additionalRouteVals |
|
System.Object |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
Type Parameters
View Source
Helper method to create a new form to execute in the Umbraco request pipeline to a surface controller plugin
Declaration
public static MvcForm BeginUmbracoForm<T>(this IHtmlHelper html, string action, object additionalRouteVals, object htmlAttributes, FormMethod method, bool? antiforgery)
where T : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
|
System.String |
action |
|
System.Object |
additionalRouteVals |
|
System.Object |
htmlAttributes |
|
Microsoft.AspNetCore.Mvc.Rendering.FormMethod |
method |
|
System.Nullable<System.Boolean> |
antiforgery |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Mvc.Rendering.MvcForm |
|
Type Parameters
View Source
CachedPartialAsync(IHtmlHelper, String, Object, TimeSpan, Boolean, Boolean, ViewDataDictionary, Nullable<Func<Object, ViewDataDictionary, String>>)
Declaration
public static async Task<IHtmlContent> CachedPartialAsync(this IHtmlHelper htmlHelper, string partialViewName, object model, TimeSpan cacheTimeout, bool cacheByPage = false, bool cacheByMember = false, ViewDataDictionary viewData = null, Func<object, ViewDataDictionary, string>? contextualKeyBuilder = null)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
htmlHelper |
|
System.String |
partialViewName |
|
System.Object |
model |
|
TimeSpan |
cacheTimeout |
|
System.Boolean |
cacheByPage |
|
System.Boolean |
cacheByMember |
|
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary |
viewData |
|
System.Nullable<Func<System.Object, Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary, System.String>> |
contextualKeyBuilder |
|
Returns
Type |
Description |
Task<Microsoft.AspNetCore.Html.IHtmlContent> |
|
View Source
Coalesce(IHtmlHelper, Object[])
Will take the first non-null value in the collection and return the value of it.
Declaration
public static string Coalesce(this IHtmlHelper helper, params object[] args)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
System.Object[] |
args |
|
Returns
Type |
Description |
System.String |
|
View Source
Concatenate(IHtmlHelper, Object[])
Joins any number of int/string/objects into one string
Declaration
public static string Concatenate(this IHtmlHelper helper, params object[] args)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
System.Object[] |
args |
|
Returns
Type |
Description |
System.String |
|
View Source
CreateHash(IHtmlHelper, String)
Generates a hash based on the text string passed in. This method will detect the
security requirements (is FIPS enabled) and return an appropriate hash.
Declaration
public static string CreateHash(this IHtmlHelper helper, string text)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
The Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper
|
System.String |
text |
The text to create a hash from
|
Returns
Type |
Description |
System.String |
Hash of the text string
|
View Source
If(IHtmlHelper, Boolean, String)
If test
is true
, the HTML encoded valueIfTrue
will be returned;
otherwise, System.String.Empty.
Declaration
public static IHtmlContent If(this IHtmlHelper html, bool test, string valueIfTrue)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
The HTML helper.
|
System.Boolean |
test |
If set to true returns valueIfTrue ; otherwise,
System.String.Empty.
|
System.String |
valueIfTrue |
The value if true .
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
The HTML encoded value.
|
View Source
If(IHtmlHelper, Boolean, String, String)
If test
is true
, the HTML encoded valueIfTrue
will be returned;
otherwise, valueIfFalse
.
Declaration
public static IHtmlContent If(this IHtmlHelper html, bool test, string valueIfTrue, string valueIfFalse)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
html |
The HTML helper.
|
System.Boolean |
test |
If set to true returns valueIfTrue ; otherwise,
valueIfFalse .
|
System.String |
valueIfTrue |
The value if true .
|
System.String |
valueIfFalse |
The value if false .
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
The HTML encoded value.
|
View Source
Join(IHtmlHelper, String, Object[])
Joins any number of int/string/objects into one string and separates them with the string separator parameter.
Declaration
public static string Join(this IHtmlHelper helper, string separator, params object[] args)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
System.String |
separator |
|
System.Object[] |
args |
|
Returns
Type |
Description |
System.String |
|
View Source
PreviewBadge(IHtmlHelper, IUmbracoContextAccessor, IHttpContextAccessor, GlobalSettings, IIOHelper, ContentSettings)
Will render the preview badge when in preview mode which is not required ever unless the MVC page you are
using does not inherit from UmbracoViewPage
Declaration
public static IHtmlContent PreviewBadge(this IHtmlHelper helper, IUmbracoContextAccessor umbracoContextAccessor, IHttpContextAccessor httpContextAccessor, GlobalSettings globalSettings, IIOHelper ioHelper, ContentSettings contentSettings)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
IUmbracoContextAccessor |
umbracoContextAccessor |
|
Microsoft.AspNetCore.Http.IHttpContextAccessor |
httpContextAccessor |
|
GlobalSettings |
globalSettings |
|
IIOHelper |
ioHelper |
|
ContentSettings |
contentSettings |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
RenderProfiler(IHtmlHelper)
Renders the markup for the profiler
Declaration
public static IHtmlContent RenderProfiler(this IHtmlHelper helper)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
ReplaceLineBreaks(IHtmlHelper, String)
HTML encodes the text and replaces text line breaks with HTML line breaks.
Declaration
public static IHtmlContent ReplaceLineBreaks(this IHtmlHelper helper, string text)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
The HTML helper.
|
System.String |
text |
The text.
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
The HTML encoded text with text line breaks replaced with HTML line breaks (<br /> ).
|
View Source
StripHtml(IHtmlHelper, IHtmlContent, String[])
Strips all HTML tags from a given string, all contents of the tags will remain.
Declaration
public static IHtmlContent StripHtml(this IHtmlHelper helper, IHtmlContent html, params string[] tags)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
Microsoft.AspNetCore.Html.IHtmlContent |
html |
|
System.String[] |
tags |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
StripHtml(IHtmlHelper, String, String[])
Strips all HTML tags from a given string, all contents of the tags will remain.
Declaration
public static IHtmlContent StripHtml(this IHtmlHelper helper, string html, params string[] tags)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
System.String |
html |
|
System.String[] |
tags |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
Outputs the hidden html input field for Surface Controller route information
Declaration
public static IHtmlContent SurfaceControllerHiddenInput<TSurface>(this IHtmlHelper htmlHelper, string controllerAction, string area, object additionalRouteVals = null)
where TSurface : SurfaceController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
htmlHelper |
|
System.String |
controllerAction |
|
System.String |
area |
|
System.Object |
additionalRouteVals |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
Type Parameters
View Source
Truncate(IHtmlHelper, IHtmlContent, Int32)
Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and
makes sure to close them
Declaration
public static IHtmlContent Truncate(this IHtmlHelper helper, IHtmlContent html, int length)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
Microsoft.AspNetCore.Html.IHtmlContent |
html |
|
System.Int32 |
length |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
Truncate(IHtmlHelper, IHtmlContent, Int32, Boolean)
Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and
makes sure to close them
Declaration
public static IHtmlContent Truncate(this IHtmlHelper helper, IHtmlContent html, int length, bool addElipsis)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
Microsoft.AspNetCore.Html.IHtmlContent |
html |
|
System.Int32 |
length |
|
System.Boolean |
addElipsis |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
Truncate(IHtmlHelper, IHtmlContent, Int32, Boolean, Boolean)
Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and
makes sure to close them
Declaration
public static IHtmlContent Truncate(this IHtmlHelper helper, IHtmlContent html, int length, bool addElipsis, bool treatTagsAsContent)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
Microsoft.AspNetCore.Html.IHtmlContent |
html |
|
System.Int32 |
length |
|
System.Boolean |
addElipsis |
|
System.Boolean |
treatTagsAsContent |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
Truncate(IHtmlHelper, String, Int32)
Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and
makes sure to close them
Declaration
public static IHtmlContent Truncate(this IHtmlHelper helper, string html, int length)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
System.String |
html |
|
System.Int32 |
length |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
Truncate(IHtmlHelper, String, Int32, Boolean)
Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and
makes sure to close them
Declaration
public static IHtmlContent Truncate(this IHtmlHelper helper, string html, int length, bool addElipsis)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
System.String |
html |
|
System.Int32 |
length |
|
System.Boolean |
addElipsis |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
Truncate(IHtmlHelper, String, Int32, Boolean, Boolean)
Truncates a string to a given length, can add a ellipsis at the end (...). Method checks for open HTML tags, and
makes sure to close them
Declaration
public static IHtmlContent Truncate(this IHtmlHelper helper, string html, int length, bool addElipsis, bool treatTagsAsContent)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
System.String |
html |
|
System.Int32 |
length |
|
System.Boolean |
addElipsis |
|
System.Boolean |
treatTagsAsContent |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
TruncateByWords(IHtmlHelper, IHtmlContent, Int32)
Truncates a string to a given amount of words, can add a ellipsis at the end (...). Method checks for open HTML
tags, and makes sure to close them
Declaration
public static IHtmlContent TruncateByWords(this IHtmlHelper helper, IHtmlContent html, int words)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
Microsoft.AspNetCore.Html.IHtmlContent |
html |
|
System.Int32 |
words |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
TruncateByWords(IHtmlHelper, IHtmlContent, Int32, Boolean)
Truncates a string to a given amount of words, can add a ellipsis at the end (...). Method checks for open HTML
tags, and makes sure to close them
Declaration
public static IHtmlContent TruncateByWords(this IHtmlHelper helper, IHtmlContent html, int words, bool addElipsis)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
Microsoft.AspNetCore.Html.IHtmlContent |
html |
|
System.Int32 |
words |
|
System.Boolean |
addElipsis |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
TruncateByWords(IHtmlHelper, String, Int32)
Truncates a string to a given amount of words, can add a ellipsis at the end (...). Method checks for open HTML
tags, and makes sure to close them
Declaration
public static IHtmlContent TruncateByWords(this IHtmlHelper helper, string html, int words)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
System.String |
html |
|
System.Int32 |
words |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
TruncateByWords(IHtmlHelper, String, Int32, Boolean)
Truncates a string to a given amount of words, can add a ellipsis at the end (...). Method checks for open HTML
tags, and makes sure to close them
Declaration
public static IHtmlContent TruncateByWords(this IHtmlHelper helper, string html, int words, bool addElipsis)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
helper |
|
System.String |
html |
|
System.Int32 |
words |
|
System.Boolean |
addElipsis |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|
View Source
ValidationSummary(IHtmlHelper, String, Boolean, String, Object)
A validation summary that lets you pass in a prefix so that the summary only displays for elements
containing the prefix. This allows you to have more than on validation summary on a page.
Declaration
public static IHtmlContent ValidationSummary(this IHtmlHelper htmlHelper, string prefix = "", bool excludePropertyErrors = false, string message = "", object htmlAttributes = null)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper |
htmlHelper |
|
System.String |
prefix |
|
System.Boolean |
excludePropertyErrors |
|
System.String |
message |
|
System.Object |
htmlAttributes |
|
Returns
Type |
Description |
Microsoft.AspNetCore.Html.IHtmlContent |
|