ASP MVC5 Allow HTML

Berikut adalah  cara supaya user bisa input html di dalam form (misalnya menggunakan wysiwyg editor) di MVC 5.

Jika MVC4 tidak perlu [outputcache]

[code language=”csharp”]
public class FooModel {
//other properties

[AllowHtml]
public string BarField { get; set; }
}
[/code]

[code language=”csharp”]
[OutputCache(NoStore = true, Duration = 0, Location = OutputCacheLocation.None)]
public class FooController : Controller {
}
[/code]

Chandra Oemaryadi has written 244 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>