Click to See Complete Forum and Search --> : ISAPI


Hoss
April 7th, 1999, 04:12 PM
Challenging Problem? Lets see who can figure it out. I am trying to create
an ISAPI DLL that I will send variable to tags in HTML docs. I am using VC++
6.0 and the IIS application start. I have successfully created several apps
that create all the pages dynamically, but I wish to send info to a template
html file. Something similar in VB, or Delphi.

<#tag1>Tag variable</#tag1>
<#tag_Variable>
Both of these would be replaced by a variable sent to the server then parsed
into the html page loaded by the sever. Maybe C++ cannot handle this?

Lynn


Here is a sample of a vb app
Private Sub Template1_ProcessTag(ByVal TagName As String, TagContents As
String, SendTags As Boolean)
Dim NewContents As String
NewContents = "<p>"
NewContents = NewContents & "The contents of this page are generated by
code in the following procedure.</p>"
NewContents = NewContents & "<p>"
NewContents = NewContents & "Private Sub Template1_ProcessTag(ByVal TagName
As String, TagContents As String, SendTags As Boolean)</p>"
NewContents = NewContents & "<ul>"
NewContents = NewContents & "<li>TagName = " & TagName & "</li>"
NewContents = NewContents & "<li>"
NewContents = NewContents & "TagContents = " & TagContents & "</li>"
NewContents = NewContents & "<li>"
NewContents = NewContents & "SendTags = " & SendTags & "</li>"
NewContents = NewContents & "</ul>"
NewContents = NewContents & "<p>"
NewContents = NewContents & "The ProcessTag event was fired when this
'<WC@NEW>HTMLTagcontents</WC@NEW>' code in the Page11.htm of
this project was parsed. View Page11.htm to see the HTML page that caused
this event to be fired.</p>"
NewContents = NewContents & "<p>"
NewContents = NewContents & "This webclass project contains one template
and three custom webitems. You are viewing the template. There are two
connected events: the button below, and the image at the bottom of the
screen. The hyperlinks below are generated dynamically with the contents of
the page. </P>"
NewContents = NewContents & "Click on any of the following links for a
demostration of that feature."
NewContents = NewContents & "<ul>"
NewContents = NewContents & "<li><a href = """ & URLFor(WebItem1) &
""">Fire the respond event in Custom WebItem1</a>" & "</li>"
NewContents = NewContents & "<li><a href = """ & URLFor(WebItem1,
"CustomEventInWebItem1") & """>Call a Custom Event in Custom WebItem1</a>" &
"</li>"
NewContents = NewContents & "<li><a href = """ & URLFor(Template1,
"UserEventInTemplate1") & """>Fire an HREF to UserEvent in Template1</a>" &
"</li>"
URLData = "Generic"
NewContents = NewContents & "<li><a href = """ & URLFor(WebItem3) & """>We
set URLData=Generic and this hyperlink calls a custom WebItem that uses
URLData</a></li>"
NewContents = NewContents & "</ul>"
NewContents = NewContents & "<p>"
TagContents = NewContents
SendTags = False
End Sub



We Could all be teachers!