This is a migrated thread and some comments may be shown as answers.

Pass HTML to the ListView Template

3 Answers 669 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 05 Nov 2012, 04:44 PM
When creating a template, I included a ${someHTMLText} in my template.  The result is that the HTML is displayed as text on the screen rather than rendered by the browser.  Is this possible?

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 07 Nov 2012, 09:54 AM
Hi Paul,

 You can check the templates documentation article which shows how to use raw html instead of encoded.

All the best,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Paul
Top achievements
Rank 1
answered on 07 Nov 2012, 02:30 PM
Yes, I did that.  I tried #: someHTMLText# in conjunction with the ${someHTMLText} attempts.  It always just shows the HTML text, never rendered HTML.
0
Accepted
Atanas Korchev
Telerik team
answered on 07 Nov 2012, 02:38 PM
Hi Paul,

 Here is a quote from the documentation:

There are three ways to use the hash syntax:

  1. Render literal values: #= #
  2. Render HTML-encoded values: #: #
  3. Execute arbitrary JavaScript code: # if(...){# ... #}#

If you use #: # your output will be encoded. You need to use #= # like this:

#= someHTMLText #

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView
Asked by
Paul
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Paul
Top achievements
Rank 1
Share this question
or