I'm working on an ASP.NET MVC3 project.
In a basic update page, I'm trying to display data recorded in the DB into some TextBoxFor. However, the data can contain some special characters, like quote ' or accented letters like é
When I write
@Html.TextBoxFor(m => m.MyProperty)
The displayed text looks like L'avée instead of L'avée.
I've seen this question but the answer doesn't change anything for me.
Is there a way to display my string PROPERLY with accented letters and quotes in a TextBoxFor ?
UPDATE
This field is in a partial view containing only this field :
@model MyApp.Models.SomeModel
<div class="form-group">
@Html.LabelFor(m => m.MyModel.Submodel.MyProperty)
@Html.TextBoxFor(m => m.MyModel.Submodel.MyProperty, new { @class = "form-control", @id = "txtMyProperty" })*@
</div>
Here, SomeModel is correctly displayed (believe me).
SomeModelhas aMyModelproperty.MyModelhas aSomeModelpropertySomeModelhas aMyFieldfield.
Everything is correctly filled from DB (believe me, it has been tested and re-tested).
However, I can't correctly display MyField if it has special characters. It is displayed, but with HTML reprensentation like '