Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Custom Control +Shopping Cart Options

Custom Control +Shopping Cart Options

Scheduled Pinned Locked Moved ASP.NET
databasehelptutorialquestionannouncement
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gekoscan
    wrote on last edited by
    #1

    Hey, Okay here's the problem. I have a product line with shoes and clothes. The database for the productline looks like this. <-Table: Products-> ProductId ProductDescription ProductName ProductPrice ProductOption Now depending if the product is a shoe or a peice of clothing the ProductOption has a value of 0 or 1. When it is a 0 it is a shoe. When showing a shoe I want to be able to have a dropdown combobox that will allow the user to select the shoe size. But when it is not a shoe I don't want to see this control at all. Now this is a simple version but of what I am trying to accomplish. My product option actually ranges from 0 to 11 and I need different controls for each one. Some have textboxes and some have dropdowns. Can anyone give me some insight into how this is usually done? Or a tutorial posted somewhere that might lead to some answers? Thanks so much!:wtf:

    J 1 Reply Last reply
    0
    • G gekoscan

      Hey, Okay here's the problem. I have a product line with shoes and clothes. The database for the productline looks like this. <-Table: Products-> ProductId ProductDescription ProductName ProductPrice ProductOption Now depending if the product is a shoe or a peice of clothing the ProductOption has a value of 0 or 1. When it is a 0 it is a shoe. When showing a shoe I want to be able to have a dropdown combobox that will allow the user to select the shoe size. But when it is not a shoe I don't want to see this control at all. Now this is a simple version but of what I am trying to accomplish. My product option actually ranges from 0 to 11 and I need different controls for each one. Some have textboxes and some have dropdowns. Can anyone give me some insight into how this is usually done? Or a tutorial posted somewhere that might lead to some answers? Thanks so much!:wtf:

      J Offline
      J Offline
      Jason McBurney
      wrote on last edited by
      #2

      Insted of special caseing each Item had you considered having a object for each item with it's very own rendering section? you could use an object factory to prodce the object related to the database information?

      G 1 Reply Last reply
      0
      • J Jason McBurney

        Insted of special caseing each Item had you considered having a object for each item with it's very own rendering section? you could use an object factory to prodce the object related to the database information?

        G Offline
        G Offline
        gekoscan
        wrote on last edited by
        #3

        Hey Jason, Thanks very much for taking the time to reply. You suggested and object factory. This sounds quite interesting, I have never heard of something like this. Is there a tutorial or some documentation on what you are describing? Thanks very much.

        J 1 Reply Last reply
        0
        • G gekoscan

          Hey Jason, Thanks very much for taking the time to reply. You suggested and object factory. This sounds quite interesting, I have never heard of something like this. Is there a tutorial or some documentation on what you are describing? Thanks very much.

          J Offline
          J Offline
          Jason McBurney
          wrote on last edited by
          #4

          http://www.dofactory.com/Patterns/PatternFactory.aspx[^] This is the basic concept. feel free to email me if you have any more questions.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups