MVC Html.EditorFor wont accept markup
Guys, One of my textboxes needs to accept a user inputting HTML:
<%= Html.EditorFor(m => m.Setting, new { model = Model })%>
When I put plain text into the box it cor开发者_运维百科rectly populates my Setting property.
When I put the following into the textbox I get nothing:
<b>Text<b>
Just a clue as to how to even debug this would be appreciated. Many thanks.
Have you tried putting [ValidateInput(false)]
on top of your action?
I bet it's sth related to input validation and the fact that you're posting HTML markup.
精彩评论