Hi,
There are different methods for using one file (product.asp) to display dynamic content.
One simple method is to select case based on the product ID sent to the page through the address: imagine you visit the page product.asp?product_id=1
Select Case Request.QueryString("product_id")
Case 1
'CONTENT RELATED TO PRODUCT ONE
Response.Write "Product 1"
Case Else 'no product is selected
Response.Write "<h3>Please select a product</h3>"
Response.Write "<a href=""product.asp?product_id=1"">Product 1 </a>"
End Select
Another method is to use SSI (Server Side Includes). You can include files based on the product ID retrieved from the querystring:
Select Case Request.QueryString("product_ID")
Case 1 %>
<!-- #Include File = "product1.asp" -->
<% Case 2 %>
<!-- #Include File = "product2.asp" -->
...
...
<% Case Else %>
<!-- #Include File = "product_overview.asp" -->
<% End Select %>
Based on this you can build a whole website, which is displayed in one page only!
Good luck, happy coding!
Reputation Points: 11
Solved Threads: 7
Junior Poster in Training
Offline 88 posts
since Feb 2007