Use the VB Response Object to Generate Dynamic HTML Pages

Use the VB Response Object to Generate Dynamic HTML Pages

I researched Windows Script Components (WSC) and was interested in their capability to integrate with ASP. I tried integrating a VB DLL with ASP. I included a reference to the Microsoft Active Server Pages Object Library (ASP.dll) in the DLL and used the Response object to write my HTML. I was surprised to find it worked when I tested it. It meant I could create a DLL that had common reusable routines for creating lists and filling combo boxes. The possibilities are endless, all in compiled VB DLL code.

The DLL has a method called ShowRecordSet that has four parameters:

  • StrConnectString (the database connect string)
  • StrSQL (the SQL command to execute)
  • StrHeading (a heading for the table)
  • ASP Response (the reference to the Response object of the ASP page)

The DLL connects to the database, executes the query, and writes out an HTML table with a header and detail line for each row in the recordset. Use this DLL CRShtml class code:

 Option Explicit'Color constantsConst PageBgColor As String =

See also  How to Create and Deploy QR Codes Online: A Comprehensive Guide

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist