1

As per Microsoft we have to use the below line to add Tag Helpers.

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

Here, they have used * as a wild card. This means it imports all tag helpers from the Microsoft.AspNetCore.Mvc.TagHelpers assembly. Correct me if I am wrong.

I don't want to use *. I only want to use asp-append-version for my Image.

What should I write instead of *?

2
  • As the official MS docs show you: @addTagHelper AuthoringTagHelpers.TagHelpers.EmailTagHelper, AuthoringTagHelpers - specify the fully qualified class name of the tag helper, plus its namespace, to reference only a single tag helper explicitly Commented Apr 7, 2022 at 6:49
  • Thanks, but what should I write if I have to use "asp-append-version" in my image without a wild card. Didn't find any document on the MS page. Commented Apr 7, 2022 at 6:59

1 Answer 1

2

It will work like this.

@addTagHelper Microsoft.AspNetCore.Mvc.TagHelpers.ImageTagHelper ,Microsoft.AspNetCore.Mvc.TagHelpers  

You can follow below git hub page, where you can get the class name of all built-in tag helpers. Hope this will help someone.

https://github.com/aspnet/Mvc/tree/master/src/Microsoft.AspNetCore.Mvc.TagHelpers

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.