Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Razor in cshtml (but not ASP.NET MVC)
Message
 
 
À
Tous
Information générale
Forum:
C#
Catégorie:
Code, syntaxe and commandes
Titre:
Using Razor in cshtml (but not ASP.NET MVC)
Divers
Thread ID:
01671391
Message ID:
01671391
Vues:
45
Hi everybody,

I'm wondering how can I include some info into the chtml using Razor syntax. I found this

https://stackoverflow.com/questions/32012178/how-to-include-raw-html-file-into-razor-view

however when I try to type @Html. I get Html doesn't exist in the current context. I assume I need to add some using but not sure what exactly. This is what I'm using right now
@using Siriusware.Middleware
@using Siriusware.Library
@inherits RazorEngine.Templating.TemplateBase<Siriusware.Middleware.Rentals.TemplateData>
@{
    const string templateName = "FormList.cshtml";
}
what do I need to add in order to be able to use @Html.Raw() syntax ?

UPDATE. My colleague told me that we can just use @Raw() and this indeed works.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Répondre
Fil
Voir

Click here to load this message in the networking platform