Using Dataset Page Producers

From RAD Studio
Jump to: navigation, search

Go Up to Representing a Dataset in HTML

Dataset page producers work like other page producer components: they convert a template that includes HTML-transparent tags into a final HTML representation. They include the special ability, however, of converting tags that have a tag name which matches the name of a field in a dataset into the current value of that field. For more information about using page producers in general, see Using Page Producer Components.

To use a dataset page producer, add a Web.DSProd.TDataSetPageProducer component to your Web module and set its DataSet property to the dataset whose field values should be displayed in the HTML content. Create an HTML template that describes the output of your dataset page producer. For every field value you want to display, include a tag of the form


in the HTML template, where FieldName specifies the name of the field in the dataset whose value should be displayed.

When your application calls the Content, ContentFromString, or ContentFromStream method, the dataset page producer substitutes the current field values for the tags that represent fields.

See Also