Content Supported by Sourcelens Consulting

VERSION 5.00
Begin {17016CEE-E118-11D0-94B8-00A0C91110ED} wbcls1 
   ClientHeight    =   8535
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   11370
   _ExtentX        =   20055
   _ExtentY        =   15055
   MajorVersion    =   0
   MinorVersion    =   8
   StateManagementType=   1
   ASPFileName     =   ""
   DIID_WebClass   =   "{CF330DC8-60CF-11D1-B8F3-00AA00B9290D}"
   DIID_WebClassEvents=   "{CF330DC7-60CF-11D1-B8F3-00AA00B9290D}"
   TypeInfoCookie  =   209
   BeginProperty WebItems {193556CD-4486-11D1-9C70-00C04FB987DF} 
      WebItemCount    =   4
      BeginProperty WebItem1 {FA6A55FE-458A-11D1-9C71-00C04FB987DF} 
         MajorVersion    =   0
         MinorVersion    =   8
         Name            =   "Template1"
         DISPID          =   1280
         Template        =   "Page11.htm"
         Token           =   "WC@"
         DIID_WebItemEvents=   "{AB17974D-86A9-11D1-BA6D-00C04FAD58AF}"
         ParseReplacements=   0   'False
         AppendedParams  =   ""
         HasTempTemplate =   0   'False
         UsesRelativePath=   -1  'True
         OriginalTemplate=   "D:\webclasses\testing\Page1.htm"
         TagPrefixInfo   =   2
         BeginProperty Events {193556D1-4486-11D1-9C70-00C04FB987DF} 
            EventCount      =   1
            BeginProperty Event0 {193556D3-4486-11D1-9C70-00C04FB987DF} 
               Name            =   "Form1"
               DISPID          =   1280
               Type            =   1
               OriginalHREF    =   ""
               TagType         =   1310944
               BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
                  AttribCount     =   1
                  BeginProperty Attrib0 {FA6A55FC-458A-11D1-9C71-00C04FB987DF} 
                     TagType         =   1
                     Attribute       =   "ACTION"
                     State           =   3
                     TagName         =   "Form1"
                     OriginalURL     =   "wcdemo.ASP"
                     Parent          =   ""
                     Template        =   "Template1"
                     BoundEvent      =   "Form1"
                     BoundItem       =   ""
                     Suffix          =   ""
                     UsesAnonymousName=   -1
                     TagNumber       =   1
                  EndProperty
               EndProperty
            EndProperty
         EndProperty
         BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
            AttribCount     =   0
         EndProperty
      EndProperty
      BeginProperty WebItem2 {FA6A55FE-458A-11D1-9C71-00C04FB987DF} 
         MajorVersion    =   0
         MinorVersion    =   8
         Name            =   "WebItem1"
         DISPID          =   1281
         Template        =   ""
         Token           =   "WC@"
         DIID_WebItemEvents=   "{20EE126D-8758-11D1-BA6D-00C04FAD58AF}"
         ParseReplacements=   0   'False
         AppendedParams  =   ""
         HasTempTemplate =   0   'False
         UsesRelativePath=   0   'False
         OriginalTemplate=   ""
         TagPrefixInfo   =   2
         BeginProperty Events {193556D1-4486-11D1-9C70-00C04FB987DF} 
            EventCount      =   1
            BeginProperty Event0 {193556D3-4486-11D1-9C70-00C04FB987DF} 
               Name            =   "CustomEventInWebItem1"
               DISPID          =   1280
               Type            =   1
               OriginalHREF    =   ""
               TagType         =   0
               BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
                  AttribCount     =   0
               EndProperty
            EndProperty
         EndProperty
         BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
            AttribCount     =   0
         EndProperty
      EndProperty
      BeginProperty WebItem3 {FA6A55FE-458A-11D1-9C71-00C04FB987DF} 
         MajorVersion    =   0
         MinorVersion    =   8
         Name            =   "WebItem2"
         DISPID          =   1282
         Template        =   ""
         Token           =   "WC@"
         DIID_WebItemEvents=   "{260CB72E-8761-11D1-BA6D-00C04FAD58AF}"
         ParseReplacements=   0   'False
         AppendedParams  =   ""
         HasTempTemplate =   0   'False
         UsesRelativePath=   0   'False
         OriginalTemplate=   ""
         TagPrefixInfo   =   2
         BeginProperty Events {193556D1-4486-11D1-9C70-00C04FB987DF} 
            EventCount      =   0
         EndProperty
         BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
            AttribCount     =   1
            BeginProperty Attrib0 {FA6A55FC-458A-11D1-9C71-00C04FB987DF} 
               TagType         =   2
               Attribute       =   "SRC"
               State           =   2
               TagName         =   "Img1"
               OriginalURL     =   "wcdemo.ASP?WCI=WebItem2&WCU"
               Parent          =   ""
               Template        =   "Template1"
               BoundEvent      =   ""
               BoundItem       =   "WebItem2"
               Suffix          =   "Src"
               UsesAnonymousName=   -1
               TagNumber       =   1
            EndProperty
         EndProperty
      EndProperty
      BeginProperty WebItem4 {FA6A55FE-458A-11D1-9C71-00C04FB987DF} 
         MajorVersion    =   0
         MinorVersion    =   8
         Name            =   "WebItem3"
         DISPID          =   1283
         Template        =   ""
         Token           =   "WC@"
         DIID_WebItemEvents=   "{A43CFBA9-876D-11D1-BA6D-00C04FAD58AF}"
         ParseReplacements=   0   'False
         AppendedParams  =   ""
         HasTempTemplate =   0   'False
         UsesRelativePath=   0   'False
         OriginalTemplate=   ""
         TagPrefixInfo   =   2
         BeginProperty Events {193556D1-4486-11D1-9C70-00C04FB987DF} 
            EventCount      =   0
         EndProperty
         BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
            AttribCount     =   0
         EndProperty
      EndProperty
   EndProperty
   NameInURL       =   "wcdemo"
End
Attribute VB_Name = "wbcls1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Private Sub Template1_Form1()
  With Response
    .Write "<html>"
    .Write "<body>"
    .Write "The contents of this page were dynamically generated by code in Template1_Form1() procedure.  The procedure fired when you selected the button on the previous page."
    .Write "<p>"
    .Write "<p>"
    .Write "This is a custom event for Template1</p>"
    .Write "<p>"
    .Write "When you click the link below, processing will shift from this event back to the Template1_Respond event.</p>"
    .Write "<p>"
    .Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a></p>"
    .Write "<p>"
    .Write "</body>"
    .Write "</html>"
  End With
End Sub

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 '&lt;WC@NEW&gt;HTMLTagcontents&lt;/WC@NEW&gt;'  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

Private Sub Template1_Respond()
  Template1.WriteTemplate
End Sub

Private Sub Template1_UserEvent(ByVal EventName As String)
  With Response
    .Write "<html>"
    .Write "<body>"
    .Write "The contents of this page were dynamically generated by code in Template1_UserEvent() procedure.  The procedure fired when you selected the hyperlink on the previous page, which fired the following custom event:"
    .Write "<p>"
    .Write "Template1_UserEvent(ByVal EventName As String)</p>"
    .Write "<p>"
    .Write "EventName = " & EventName & "</p>"
    .Write "<p>"
    .Write "When you click the link below, processing will shift from this event back to the Template1_Respond event.</p>"
    .Write "<p>"
    .Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a></p>"
    .Write "<p>"
    .Write "</body>"
    .Write "</html>"
  End With
End Sub

Private Sub WebClass_Start()
Set NextItem = Template1

End Sub
Private Sub WebItem1_CustomEventInWebItem1()
   With Response
    .Write "<html>"
    .Write "<body>"
    .Write "The contents of this page were dynamically generated by code in WebItem1_CustomEventInWebItem1() procedure.  The procedure fired when you selected the hyperlink on the previous page, which fired the following custom event:"
    .Write "<p>"
    .Write "WebItem1_CustomEventInWebItem1()</p>"
    .Write "<p>"
    .Write "When you click the link below, processing will shift from this event back to the Template1_Respond event.</p>"
    .Write "<p>"
    .Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a></p>"
    .Write "<p>"
    .Write "</body>"
    .Write "</html>"
  End With
End Sub

Private Sub WebItem1_Respond()
 With Response
 .Write "<html>"
 .Write "<head>"
 .Write "</head>"
 .Write "<body>"
 .Write "The contents of this page were dynamically generated by code in WebItem1_Respond() procedure.  The procedure fired when you selected the hyperlink on the previous page, which fired the following Respond event:"
 .Write "<p>"
 .Write "WebItem1_Respond()</p>"
 .Write "<p>"
 .Write "When you click on any hyperlink on this page, processing will shift from this event back to the Template1_Respond event.</p>"
 .Write "<p>"
 .Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a>"
 .Write "<table border=1>"
 For Each Key In Request.ServerVariables
   .Write "<tr><td>"
' Shows how to href on specific fields in table
   .Write "<a href=" + URLFor(Template1) + ">"
   .Write Key
   .Write "</a>"
   .Write "</td><td>"
   .Write Request.ServerVariables(Key)
 .Write "</td></tr>"
 Next
.Write "</table>"
.Write "<p>"
.Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a>"
.Write "</body>"
.Write "</html>"
 End With
End Sub
Private Sub WebItem2_Respond()
    Dim ba() As Byte
    Dim hFile As Long
    hFile = FreeFile
    'Make this a relative path to an img on your server
    Open App.Path & "\explorer.bmp" For Binary As #hFile
    ReDim ba(LOF(hFile))
    Get #hFile, , ba
    Close #hFile
    Response.BinaryWrite ba
End Sub
Private Sub WebItem3_Respond()
With Response
 .Write "<html>"
 .Write "<head>"
 .Write "</head>"
 .Write "<body>"
 .Write "The contents of this page were dynamically generated by code in WebItem3_Respond() procedure.  The procedure fired when you selected the hyperlink on the previous page, which fired the following respond event:"
 .Write "<p>"
 .Write "WebItem3_Respond()</p>"
 .Write "<p>"
 .Write "URLData = " & URLData & "</p>"
 .Write "<p>"
 .Write "We set the value of URLData to 'Generic' in the Template1_Respond event before you selected the hyperlink that fired this event. </p>"
 .Write "<p>"
 .Write "When you click the link below, processing will shift from this event back to the Template1_Respond event.</p>"
 .Write "<p>"
 .Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a></p>"
 .Write "<p>"
 .Write "</body>"
 .Write "</html>"
End With
End Sub