Render Method (ContainerRenderer Object)

Render Method (ContainerRenderer Object)

Important  The Collaboration Data Objects (CDO) 1.2.1 Rendering objects are not installed by or supported for use with Exchange Server 2003 or later.

The Render method renders the specified rows of a container object.

Syntax

strHTML = objContRend.Render(iStyle [, varPageNo] [, varboolRaw**] [, varResponseObject] )**

strHTML

On successful return, contains a string with the HTML hypertext representing the rows of the folder or address book container. However, if the varResponseObject parameter is supplied, Render returns a value of Empty.

objContRend

Required. The ContainerRenderer object.

iStyle

Required. Long. Determines which objects are to be rendered into HTML hypertext. The iStyle parameter must match the setting of the DataSource property as follows:

iStyle setting

Value

Data source

Objects rendered

CdoFolder Contents

1

AddressEntries, Messages, Recipients

Address entries, group headers and messages, or recipients, but not child folders

CdoFolder Hierarchy

2

Folders, Messages

Child folders, but not address entries, group headers, messages, or recipients

varpageNo

Optional. Long. The page at which the rendering is to begin. The default value is 1.

varboolRaw

Optional. Boolean. Reserved. Do not use.

varResponseObject

Optional. Object. An Active Server response object used to accumulate HTML output to send to the browser. This parameter is used primarily in ASP applications. If varResponseObject is not supplied, the output is written to strHTML.

Remarks

The iStyle parameter applies to all container objects. You must set it to correspond to the value of the DataSource property. If you set it incorrectly, for example to CdoFolderHierarchy for a Recipients collection, or if you do not set it, Render returns CdoE_INVALID_PARAMETER.

Normally only enough rows to fill one frame should be rendered in one call to the Render method. The programmer can control this by setting the RowsPerPage property. Note that the appropriate number of rows depends on several factors, including the frame size, the font size, what other items are being displayed together with the table tows, and download time to the browser.

The HTML output of the Render and RenderHeading methods is treated as two separate tables, one for the header row and one for the container contents rows. The TablePrefix and TableSuffix property strings are inserted around each of these tables.

Example

If the container contains 40 messages, this code fragment processes them in three renderings:

Dim pStart As Long ' current starting page
Dim rType As Integer ' type of rows to be rendered
Dim objResp As Object ' Active Server response object
' assume ContainerRenderer object already defined and initialized
objContRend.RowsPerPage = 15 ' 15 rows might fit reasonably in a frame
rType = CdoFolderContents
' ...
pStart = 1
objContRend.Render rType, pStart, , objResp ' pStart = 2 on return
objContRend.Render rType, pStart, , objResp ' pStart = 3 on return
objContRend.Render rType, pStart, , objRes) ' pStart = 3 on return 

See Also

Concepts

ContainerRenderer Object