GetHtmlContent Method

Applies To  See Also 

The GetHtmlContent method handles the user's request to generate the HTML for the report and returns the HTML as a string.


Sub GetHtmlContent(

    Request As Object,

    Response As Object,

    [Session As Object]) As String



The object containing the values passed to the server during an HTTP request.


The object that receives the HTML output and sends it to the client.


The object that represents the user's session on the server. This parameter is optional.


Because the Session parameter is optional, administrators now have the ability to turn off session management. In this case, the session object becomes invalid. Your ASP must include the directive "CodePage=65001" if session management is turned off.

For example,

<%@ CodePage=65001 Language="VBScript"%>

For ASP files that are saved as Shift-JIS, it is not possible to turn off session management. In order to display correctly in the web browser, the ASP files must include both CodePage=932 and Session.CodePage=65001. As a result, it is not possible to use sessionless ASP pages.

Either the GetHtmlContent method or the ProcessHttpRequest method can be used to handle the user's request to generate the HTML for the report, depending on how you write your ASP code. If the viewer's content is to be displayed more than once, then using the GetHtmlContent method is more efficient, because the request is processed once and the resulting HTML string can be used multiple times. In this case, you must set the content type of the HTML, as recommended in the table. Additionally, using GetHtmlContent sets IsOwnPage to false and disables exporting and printing.

Note:    The GetHtmlContent method cannot be used with the export control.

Viewing formatRecommended HTML content type

Standard web reporting

"text/html; charset=UTF-8"


"text/html" or "text/vnd.wap.wml"


"text/html; charset=UTF-8"

Business Objects
Support services