Linking Listbox child categories

Posted by Gerardo Abdo on Stack Overflow See other posts from Stack Overflow or by Gerardo Abdo
Published on 2010-05-12T17:34:22Z Indexed on 2010/05/12 19:44 UTC
Read the original article Hit count: 301

Filed under:
|
|
|

Hello

I have few monhts working with aspx, and now I'm developing a shopping cart website. For the employee to upload the products on the DB, every product needs to be linked to a category and sub category, and sub-sub category, and so on. Sometimes the sub-sub categories are up to 5. For example Electronics-TV-LCD-Samsung-40 inches.

First, What I would like to identify is if the SQL table has the apporpiate structure. I have 3 columns Id, Description, Parent_Id. Categories with Parent Id=0 is used for the top ones. Is this the best way to do it?

Then I want to use the ListBox control to select main Categories, and once it is selected, filled a second listbox with its childs and so on. Do I need to query SQL DB everytime the change event happens? I heard about linq but have not used yet, What would be your suggestion to do this. If you have seen a sample to understand it better will be appreciated.

Thank you

© Stack Overflow or respective owner

Related posts about aspx

Related posts about c#