title: Classic ASP render a template and send variables
body: <p>I have a classic ASP page, and I need to create a loop for each row on a table and then create an html document and save it to the hard drive, but I want to create a template so I just send the two variables to the template so I don't have to write the HTML document each time on the loop.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>SQL = "select Title, Article from [ASPTest].[dbo].[articles]"
    set rs = conn.execute(SQL)
    arrRecs = rs.GetRows
    For row = 0 To UBound(arrRecs, 2) 'Rows
        For col = 0 To UBound(arrRecs, 1) 'Columns
            Response.Write rs.Fields(col).Name &amp; " = " &amp; arrRecs(col, row) &amp; " "
            dim fs,f
            set fs=Server.CreateObject("Scripting.FileSystemObject")
            set f=fs.CreateTextFile("C:\Users\User\Documents\ASP Pages\"+arrRecs(col, row)+".html",true)
            f.write("&lt;html&gt;&lt;body&gt;&lt;div&gt;It kinda works&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;")
            f.close
            set f=nothing
            set fs=nothing
        Next
        Response.Write "&lt;br /&gt;"
    Next
  </code></pre>
  
  <p>Is there a way to use a template that has 2 variable holders and send the article name and title to the template and then save it to the disk?</p>
  
  <p>Thank you.</p>