3
Hello.
I have a Textareafor which receives the HTML content, however when saving the data, the accents and special characters are encoded and I have problems later when editing or viewing the data.
Register view:
div class="row form-group">
<div class="col-md-12 col-xs-12">
@Html.LabelFor(model => model.Preparo, htmlAttributes: new { @class = "col-form-label" })
@Html.TextAreaFor(model => model.Preparo, new { @class = "form-control", @rows = 15, @value = "Digite o procedimento ou código, irá autocompletar" })
@Html.ValidationMessageFor(model => model.Preparo, "", new { @class = "text-danger" })
</div>
</div>
Listing view:
@Html.Raw(item.Preparo)
Model:
[Required]
[AllowHtml]
public string Preparo { get; set; }
How could display the text with the accents for the user?
you have to place an html editor in an example: http://www.macoratti.net/17/03/mvc_rctbx1.htm
– novic
Hello @Virgilionovic, thanks for the comment, but this is not the problem, I already own an editor.
– Lucas Ost