- How to allow a user to enter html comments
- <b>text</b>
- [ValidateInput(false)]
- public ActionResult foo()
- {
- }
- public class Foo
- {
- [AllowHtml]
- public string bar{ get; set; }
- }
- </system.web>
- <httpRuntime requestValidationMode="2.0" />
- </system.web>
- public class MyModel
- {
- public MyModel()
- {
- }
- // Some other stuff in here
- [AllowHtml]
- [HttpPost]
- public string MyHtmlString { get; set; }
- }