IHTMLDatabinding::dataFormatAs Property

Sets or retrieves the rendering format for the data supplied to the object.


HRESULT IHTMLDatabinding::get_dataFormatAs(BSTR *p);HRESULT IHTMLDatabinding::put_dataFormatAs(BSTR v);


Pointer to a variable of type BSTR that receives one of the values listed in Possible Values.
BSTR that specifies one of the values listed in Possible Values.

Possible Values

text Default. Data is rendered as text.
html Data is rendered as HTML.
localized-text Microsoft Internet Explorer 5.01 and later versions. Data is rendered using the locale settings of the client machine.

Return Value

Returns S_OK if successful, or an error value otherwise.


As of Windows Internet Explorer 7, the DATAFORMATAS attribute is no longer supported for the input type=button object.

The IHTMLDatabinding::dataFld property is not available on param objects; use getAttribute('dataFld') instead.

Internet Explorer 5.01 or later honors the regional settings for the user's control panel when the DATAFORMATAS attribute is set to localized-text. Internet Explorer 5.01 or later performs a locale-dependent type conversion on the native value, instead of using the data source object to perform the conversion, when binding a textual element such as a span, div, or input to date, currency, or numeric data. Internet Explorer 5 does not provide this feature. To compensate for this limitation, a data source object can implement ISimpleDataConverter to participate in the conversion. Neither of these features is supported in earlier versions of Internet Explorer.

See Also

Introduction to Data Binding