开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜