Have suggestions/ ideas about features?

Return View from TagHelper

TagHelper + ViewComponent = TagComponent

When creating a TagHelper we return a string containing HTML. This is pretty ugly and it would be great to be able to return a View instead. Much like a ViewComponent but instead of @Component.Invoke("..") we can use the new HTML-TagHelper syntax.

Combining the best of TagHelpers and ViewComponents.

21 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Paul shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Ted commented  ·   ·  Flag as inappropriate

        Another solution is to have a HTML or razor block inside the C# class.
        For example @{<div>content</div>} could be syntax highlighted like html.

        Like when you write C# in a .cshtml file, but reversed.

        This way it looks like HTML instead of a string.

      ASP.NET vNext

      Feedback and Knowledge Base