Displaying HTML in the Dataview Webpart (DVWP)

By peter.stilgoe









If you try & display rich html columns or any other columns that uses HTML in a DVWP it will display as the actual HTML as opposed to outputting it as HTML formatted text.

If you added your data using Sharepoint designer “Insert Selected Fields” you need view your DVWP code in SPD & search for:

xsl:value-of select=”@MyHTMLFormattedColumn”

and replace it with

xsl:value-of disable-output-escaping=”yes” select=”@MyHTMLFormattedColumn”

Now your data in this column will display as you expected ie. formatted with the HTML code applied.

Note: In SPD 2010 you will need to convert your DVWP to XSLT, On the ribbon:

List View Tools –> Design –> Customize XSLT

Share

, , ,

About... peter.stilgoe

peter.stilgoeThis author published 482 posts in this site.
Sharepoint, InfoPath, K2, Nintex, Business Process Mapping, Business Intelligence, Automation, ECM, Document Management, Document Imaging, Internet Marketing & Online Business Consultant Email / MSN: pstilgoe@hotmail.com LinkedIn: Pete Stilgoe - Sharepoint Consultant









Share

FacebookTwitterEmailWindows LiveTechnoratiDeliciousDiggStumbleponMyspaceLikedin

No Comments

(Required)
(Required, will not be published)