You are here: Reference > HTML > attributes > dataFormatAs

dataFormatAs attribute

Browser support:
Specifies how data is to be rendered.
This attribute is part of the Microsoft Tabular Data Control, so it can only be used by generated content.
JavaScript page for this attribute: dataFormatAs. You can find other example(s) there.

Possible values:

String that sets the type of the rendering.
One of the following values:
html
Rendered as HTML.
localized-text
Rendered as text with locale settings applied.
text
Default. Rendered as text.
Default: text.

Example HTML code 1:

This example uses the Microsoft Tabular Data Control to introduce the dataFormatAs attribute:
<xml id="movies">
<?xml version="1.0"?>
    <movies>
        <movie>
            <name>&lt;b&gt;Clark Kent&lt;/b&gt;</name>
            <jobtitle>Superman</jobtitle>
            <born>1966</born>
        </movie>
        <movie>
            <name>&lt;b&gt;Lois Lane&lt;/b&gt;</name>
            <jobtitle>Reporter</jobtitle>
            <born>1964</born>
        </movie>
    </movies>
</xml>

<table width="100%" cellpadding="0px" cellspacing="2px" border="1px" datasrc="#movies" datapagesize="2" >
    <thead>
        <tr>
            <th>Name</th>
            <th>Jobtitle</th>
            <th>Born</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><span datafld="name" dataformatas="html"></span></td>
            <td><span datafld="jobtitle"></span></td>
            <td><span datafld="born"></span></td>
        </tr>
    </tbody>
</table>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content