• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 153
  • Last Modified:

COM - ASP - HTML

Hi,

How can I generate HTML output from COM? I would like to have a method which will do the Response.Write. From ASP I shall only call the method and the Html should be generated into the HTML page. Can anyone send a small code to do this. To avoid confusion, I shall give the point to only that person who can send me a working code.

Regards,
Suman.
0
SumanGhosh
Asked:
SumanGhosh
  • 2
1 Solution
 
puranik_pCommented:
In your COM,

Public Function WriteHTML(objResponse)
  objResponse.Write "Hello World!"
End Function

In ASP,

Dim HTMLWriter
Set HTMLWriter = Server.CreateObject("yourdll.yourclass")

HTMLWriter.WriteHTML Response

---------------------------------

Here Idea is to pass Response object (by reference) to dll and use it the same way you do in ASP.
0
 
SumanGhoshAuthor Commented:
Hi,

Thanks puranik_p for the prompt answer and the code, it works. Can you give me a hint if Microsoft Html Class can also be used with this COM? It also has all the asp and html objects.

Regards,
Suman.
0
 
puranik_pCommented:
sorry suman,
I haven't worked with Microsoft Html Class. so can't say anything about it.
:o{
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now