I have a ASP dynamic scaffolding project in which I am customizing a details view. In my data source I have a few fields containing HTML and I would like to display the rendered HTML on the page rather then the source HTML as it is currently doing. The control looks like this.
<tr>
<td class="DDLightHeader">
<asp:Label ID="lblStatementHtml" runat="server" Text="Statement" />
</td>
<td>
<asp:DynamicControl ID="dcStatementHtml" runat="server" DataField="StatementHtml" />
</td>
</tr>
I am confused on how to proceed since the default view for this control is the Text.ascx which is apparently nothing more then a literal (the same base control I use to render the HTML on my site. I am comfortable with creating a new FieldTemplate to render the HTML, but how can I force the html to render rather then display its source view.
To resolve the above issue I had to create anew FieldTemplate
HTML.ascx
HTML.cs
Then applied the UIHint for this class to the field display in the details view template.
And all was well.