I'm wondering if there are any differences between retrieving value of a site column (RichHtmlField) via PublishingWebControls:RichHtmlField vs getting its value via Container.DataItem?
<ItemTemplate>
<div runat="server">
<%# ((SPListItem)Container.DataItem)["SP_COLUMN_NAME"]%>
</div>
</ItemTemplate>
vs
<PublishingWebControls:RichHtmlField ID="..." FieldName="SP_COLUMN_NAME" ... ></PublishingWebControls:RichHtmlField>
I'm wondering about this because I'm retrieving value of a specific site column of type RichHtmlField in visual web part using CAML query and binding value of that column to ListView. It's working properly, but I found that if I added CEWP inside RichHtmlField, the content of CEWP is not rendered (I found later that content of CEWP is rendered before the end of page wrapped in hidden div). I'm using CEWP for embedding youtube video in page following this solution. But while viewing the column value via PublishingWebControls:RichHtmlField control it's working properly without any issues.
Any suggestions?