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

get IUrlHelper inside the Html Helper's method #5051

@omuleanu

Description

@omuleanu

hi,
is there an easy way to get the IUrlHelper inside the extension method of an IHtmlHelper, besides passing it as a parameter from the view
I tried this:

html.ViewContext.HttpContext.RequestServices.GetService(typeof(IUrlHelper));

but no luck

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions