How do I create one page to show various....

Results 1 to 2 of 2

Thread: How do I create one page to show various....

  1. #1
    Join Date
    Dec 1969

    Default How do I create one page to show various....

    I have a greeting cards website and it is growning. ( if anyone cares)<BR>Anyway, I would like an opinion on what I am doing and perhaps the best way to go about it. Here is the scoop:<BR>As it is now, I have MANY different pages, and each one shows from 2 to 8 cards. I want to create a standard page, just ONE page that can call up the group of cards associated.<BR>For example, the asp would be /showcards.asp and it would require a query string such as ?BDAY1 which would be the cards for page 1 of the birthday category. <BR><BR>There are dozens of ways to do this... what should I do? For example, I could create a text doc like this:<BR>BDAY1, 4, DA, DB, DC, DD<BR>BDAY2, 3, DE, DF, DG, DH<BR>etc.<BR>That would mean Birthday page one, setup page to show 4 cards, first card has code DA, second DB, etc.<BR><BR>The asp could check the query string, open the text file, parse it out, and act accordingly. <BR>Perhaps a better way would be just to include that data on the asp itself someplace... geese, I don&#039t know. <BR><BR>Any opinion would be helpful. If you can point me towards an article that is on the 4guys website, I would appreciate that too! Thanks a zillion!<BR><BR>Edward<BR>

  2. #2 Guest

    Default RE: How do I create one page to show various....

    The method you propose sounds okay to me. (ei the text file.) And it looks like a database would be a bit of overkill for your case.<BR><BR>If your range of cards is mainly going to stay static, then hardcoding in arrays may be a good option:<BR><BR>&#060;%<BR>&nbsp;&nbsp;&nbsp;dim CardGroups<BR>&nbsp;&nbsp;&nbsp;CardGroups = array( _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"BDAY1, 4, DA, DB, DC, DD", _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"BDAY2, 3, DE, DF, DG, DH" )<BR>%&#062;<BR>You could then loop through the array and parse as you suggested for the text file method, and compare to the QueryString value.<BR><BR>Or you could go straight for a multi-dimensional array.<BR>&#060;%<BR>&nbsp;&nbsp;&nbsp;dim CardGroups<BR>&nbsp;&nbsp;&nbsp;CardGroups = array( _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array("BD AY1", "4", "DA", "DB", "DC", "DD") , _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array("BD AY2", "3", "DE", "DF", "DG", "DH") )<BR>%&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts