开发者

MVC Html.EditorFor wont accept markup

开发者 https://www.devze.com 2023-02-10 05:19 出处:网络
Guys, One of my textboxes needs to accept a user inputting HTML: <%= Html.EditorFor(m => m.Setting, new { model = Model })%>

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

精彩评论

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

关注公众号