Show / Hide Table of Contents

    Class HtmlHelperExtensions

    Extension methods for the Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper interface.

    Inheritance
    System.Object
    HtmlHelperExtensions
    Namespace: Cuemon.AspNetCore.Mvc.Rendering
    Assembly: Cuemon.AspNetCore.Mvc.dll
    Syntax
    public static class HtmlHelperExtensions

    Methods

    | Improve this Doc

    UseWhen(IHtmlHelper, String, String, Action)

    Invokes the delegate body when the specified action name and controller name is matched in Microsoft.AspNetCore.Mvc.ActionContext.RouteData.

    Declaration
    public static void UseWhen(this IHtmlHelper helper, string action, string controller, Action body)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper

    The Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper to extend.

    System.String action

    The action name to match.

    System.String controller

    The controller name to match.

    System.Action body

    The delegate that, when both action and controller is matched in Microsoft.AspNetCore.Mvc.ActionContext.RouteData, is invoked.

    | Improve this Doc

    UseWhen<T>(IHtmlHelper, String, String, Func<T>)

    Creates a value of T when the specified action name and controller name is matched in Microsoft.AspNetCore.Mvc.ActionContext.RouteData.

    Declaration
    public static T UseWhen<T>(this IHtmlHelper helper, string action, string controller, Func<T> result)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper helper

    The Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper to extend.

    System.String action

    The action name to match.

    System.String controller

    The controller name to match.

    System.Func<T> result

    The function delegate that, when both action and controller is matched in Microsoft.AspNetCore.Mvc.ActionContext.RouteData, returns T.

    Returns
    Type Description
    T

    Either the value of the function delegate result or default(T).

    Type Parameters
    Name Description
    T

    The type of the value for the matched action method.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX