-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
area-ui-renderingIncludes: MVC Views/Pages, Razor Views/PagesIncludes: MVC Views/Pages, Razor Views/Pages
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
I have solution with a mix of .cshtml and .razor files (moving from MVC to mixed MVC/Razor components). I have a paradigm where my view models have HtmlString/IHtmlContent fields that could be correctly displayed in .cshtml files just be directly referencing.
HtmlString/IHtmlContent doesn't supported in Razor component, so I have to use MarkupString there.
MarkupString is more lightweight marker concept, and doesn't require framework reference to whole ASP.NET server — I like it.
However, .cshtml renderer doesn't support MarkupString, so I have to manually add Html.Raw here. I don't like it.
Describe the solution you'd like
- MarkupString supported in .cshtml files and doesn't re-encoded.
- Ideally, MarkupString moved even higher in dependecies stack into some MS.Ext. assembly, totally untied from ASP.NET and will become universally recognized "html marker" class.
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-ui-renderingIncludes: MVC Views/Pages, Razor Views/PagesIncludes: MVC Views/Pages, Razor Views/Pages