Cannot use HtmlHelper from view
See original GitHub issueUsing @Html.Raw("<span>test</span>") returns a TemplateCompilationException.
With internal error message “The name ‘Html’ does not exist in the current context”.
I assume you need to setup the HtmlHelper<TModel>() for it to work? Any other way i can pass inn a Html string from a model?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:14 (3 by maintainers)
Top Results From Across the Web
Why can't I use Html helper methods with strongly-typed ...
This error happened to me because I moved by mistake the web.config that was inside the "Views" folder. This file contains the include...
Read more >Tag Helpers in ASP.NET Core
cshtml file makes the Tag Helper available to all view files in the Views directory and subdirectories. You can use the @addTagHelper directive ......
Read more >HTML Helpers In ASP.NET MVC 5
Inline HTML Helper is used to create a reusable Helper method by using the Razor @helper tag. Inline helpers can be reused only...
Read more >Cannot declare class Cake\View\Helper\HtmlHelper
Hi to the community, I am trying to send an email with Cake\Mailer\Email; and when executing the script, I have the following error:...
Read more >Moving to ASP.NET Core: Replacing HTML Helpers that ...
In some cases, the HTML Helper code above is inside a Nuget package or is compiled code that the caller can't access. When...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I will add html helpers support in the future, so you won’t see this annoying errors, but for now - you should deal with it)
It’s been 2.5 years, still no html.raw capability. What is needed to add this?