ASP: Reference tabular data to update text on page

hycatot

New Member
I have very little background in website programming so I apologise if this might be an obvious question.I am updating some pages on a website using ASP. On a particular page, I have a list of pdf files that people can download. Currently, the title of the file is written in directly onto the page along with a link to it \[code\]myPage.asp <tr><td>Title</td><td><a href="http://stackoverflow.com/questions/12251749/something.pdf">PDF</a></td></tr>\[/code\]I wanted to collect all the titles and filenames into one table, for example:\[code\]FileCode Title Filename001 ABC abcfile.pdf002 XYZ xyz.pdf\[/code\]So that when I am populating the page I can use something like the following,\[code\]<tr><td>Table(code).Title</td><td><a href=http://stackoverflow.com/questions/12251749/Table(code).Filename>PDF</a></td></tr>\[/code\]The code doesn't have to look like that (I don't know what it will look like); this is just an example to show what I mean: I want to be able to keep all the file information in one location so it is easy to update and add things to it, and I can just reference it when I need to display some information.The reason I am doing this is because I don't want the user to be able to directly click the pdf link and get the file; they must go through a contact form to get the file and I thought it might be easier to just send a file code instead of the actual filename,\[code\]<a href="http://stackoverflow.com/questions/12251749/contactForm.asp?code=001">PDF</a>\[/code\]So this table will be accessed by contactForm.asp as well. Hence I wanted a central location for such a table and I didn't know what are the acceptable conventions for websites.
 
Back
Top