I posted this in a wrong forum yesterday and I think I was asking the wrong question so here goes again:
I have a situation where as part of a product purchase we need to enable customers to download a .pdf file as part of the purchase. Sometimes though the file is a .zip so I want the page to check to see if there is a .zip file with that product code (if the product code is abc1234, the pdf would be doc_abc123.pdf and the zip might be materials_abc123.zip with the "abc123" being a variable).
I tried using the FileExists method but something is off with my syntax and I am not sure how to make it work.
if fs.FileExists("http://domain/folder/materials<%= displayProductCode %>.zip") then
<a href="http://domain/folder/materials<%= displayProductCode %>.zip" target="blank"><img src="images/download_handbook_btn.png" alt="Download Handbook" /></a>
<a href="http://domain/folder/handbook<%= displayProductCode %>.pdf" target="_blank"><img src="images/download_handbook_btn.png" alt="Download Handbook" /></a>
It does not seems to like the ending ASP tag after the first <%= displayProductCode %>.
Can someone help me out with this?
Thanks in advance.