title: Class Structure in classic asp
body: <p>I need to use class structure in classic asp. I have written following three classes.</p>
  
  <p>Category.asp</p>
  
  <pre><code>&lt;%
  
  Class Category
  
      Private NameVar
  
      Public Property Get Name()
          Name = NameVar
      End Property
  
      Public Property Let Name(nameParam)
          NameVar = nameParam
      End Property
  
  End Class
  
  %&gt;
  </code></pre>
  
  <p>Item.asp</p>
  
  <pre><code>&lt;%
  
  Class Item
  
      Private NameVar
          Private CategoryVar
  
      Public Property Get Name()
          Name = NameVar
      End Property
  
      Public Property Let Name(nameParam)
          NameVar = nameParam
      End Property
  
      Public Property Get Category()
          category = categoryVar
      End Property
  
      Public Property Let Category(categoryParam)
      CategoryVar = categoryParam
      End Property
  
  End Class
  
  %&gt;
  </code></pre>
  
  <p>Test.asp</p>
  
  
  
  
  
  
  
  <pre><code>&lt;%
  
      Dim CategoryVar
      Set CategoryVar = New Category
  
      CategoryVar.Name = "Weight"
  
      Dim ItemVar
      Set ItemVar = New Item
  
      ItemVar.Name = "kg"
      ItemVar.Category = CategoryVar
  
  %&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;UoM Componet Testing&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;%= ItemVar.Name %&gt;&lt;br/&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I run this code, I have found some problem. Error is:</p>
  
  <blockquote>
    <p>Microsoft VBScript runtime (0x800A01B6) Object doesn't support this property or method: 'CategoryVar'". </p>
  </blockquote>
  
  <p>How can explain this? Please help me.</p>