I am converting a paper form into a MVC 4 web form. I have questions that are a paragraph worth of text that include superscript numbers that link to footnotes. This is what I am trying to do:
public class PaperFormModel
{
[Display(Name = "Full paragraph of question text copied straight
off of the paper form<a href="#footnote1"><sup>footnote 1</sup></a>
and it needs to include the properly formatted superscript
and/or a link to the footnote text.")]
public string Question1 { get; set; }
// more properties go here ...
}
After creating the model I generated the controller and related views. Everything works except the html markup in the display name is converted into html encoded text (i.e. <sup>1</sup>). The code in the view.cshtml used to display the property is just the automatically generated code:
<div class="editor-label">
@Html.LabelFor(model => model.Question1)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Question1)
@Html.ValidationMessageFor(model => model.Question1)
</div>
I am trying to figure out how to get the html markup for the footnotes to work properly or is my approach somehow wrong and I should be doing it a different way? This is my first MVC project and I am coming from an asp.net background.