Last post Feb 28, 2008 06:56 PM by manorfarm
Feb 27, 2008 07:03 PM|manorfarm|LINK
I'm a newbie to this starter kit - but like what I see so far and this forum has helped me understand (nearly) how it all hangs together and as a result I have extended the controls to request more info when posting an ad - seems to work fine - thanks for
Lets say one of these controls is Year of Production = dropdown
My question is -
When listing an Ad, say under category auto>ford>modelxxx
I can hard code Year of Production as an asp:listitem 2000 - 2001 etc
If I list an ad, say under category antiques>chairs>maple
I want to change the Year of Production dropdown to say asp:listitem> early 18th Century etc
Thus being able to use an extended generic database
I appreciate it should be a if--then--else statement based on category selection - but I'm pulling my hair out deciding where it should go - so I thought I would ask those who know there way around the program better than me
Feb 28, 2008 09:33 AM|ashmetry|LINK
I havent done that. But if i am doing it, I would create a table in the DB and populate it with the drop down values of and have a FK pointing to the corresponding category id...
cat_id | option
100 | '1995-2001'
100 | '2001-2005'
101 | 'Maple'
101 | 'Oak'
the numbers on th eleft are the cat Id of the selected category
100 is the cat Id of Car Models
101 is the cat Id of Chairs
You can then fetch all the options from the database when the category is selected and fill the drop down
Feb 28, 2008 06:56 PM|manorfarm|LINK
Thanks for the reply
If I decide to go the generic extended PostAd route as described - I will need the discipline of making sure the categories are right in the first place - so good advice - it just means I have to stop playing and get serious which is always a shame
I'll hard code a table for now with a view to turning it to an adaption of location/categories admin controls in the future (total rewrite methinks)
Will there be any problems intermingling some sqldatasource for the dropdowns with the current package