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. is this possible..?

is this possible..?

Scheduled Pinned Locked Moved ASP.NET
questionhelp
11 Posts 7 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.
  • C Offline
    C Offline
    chubbie
    wrote on last edited by
    #1

    here's the situation: is this possible to be done..? i have 2 dropdown list boxes (named A and B for easy reference).. in A, i have 3 items (nokia, samsung, motorola).. my intention is, when i select one of the items from A (nokia), i want the details to display at B (models: 8210, 8250.....). den when i select (samsung) from A, the display at B will be the models for samsung phones. can this be done..? what is the code that make this possible..? thanks for the help.. very much appreciated..:-D -DarkangeL-

    P I R S R 6 Replies Last reply
    0
    • C chubbie

      here's the situation: is this possible to be done..? i have 2 dropdown list boxes (named A and B for easy reference).. in A, i have 3 items (nokia, samsung, motorola).. my intention is, when i select one of the items from A (nokia), i want the details to display at B (models: 8210, 8250.....). den when i select (samsung) from A, the display at B will be the models for samsung phones. can this be done..? what is the code that make this possible..? thanks for the help.. very much appreciated..:-D -DarkangeL-

      P Offline
      P Offline
      PrakashBhaskar
      wrote on last edited by
      #2

      Hi, From where you populate this values i mean do you have seperate table. Thanks Warm Regards Prakash-B

      C 1 Reply Last reply
      0
      • C chubbie

        here's the situation: is this possible to be done..? i have 2 dropdown list boxes (named A and B for easy reference).. in A, i have 3 items (nokia, samsung, motorola).. my intention is, when i select one of the items from A (nokia), i want the details to display at B (models: 8210, 8250.....). den when i select (samsung) from A, the display at B will be the models for samsung phones. can this be done..? what is the code that make this possible..? thanks for the help.. very much appreciated..:-D -DarkangeL-

        I Offline
        I Offline
        imsathy
        wrote on last edited by
        #3

        fill the B dropdown with the Selectedvalue from A dropdown in the SelectedIndexChanged event of A dropdown. sathy

        1 Reply Last reply
        0
        • C chubbie

          here's the situation: is this possible to be done..? i have 2 dropdown list boxes (named A and B for easy reference).. in A, i have 3 items (nokia, samsung, motorola).. my intention is, when i select one of the items from A (nokia), i want the details to display at B (models: 8210, 8250.....). den when i select (samsung) from A, the display at B will be the models for samsung phones. can this be done..? what is the code that make this possible..? thanks for the help.. very much appreciated..:-D -DarkangeL-

          R Offline
          R Offline
          rs_net
          wrote on last edited by
          #4

          In page_Load DropDownList1.AutoPostBack = True If (Not Page.IsPostBack) Then DropDownList1.Items.Add("nokia") DropDownList1.Items.Add("samsung") DropDownList1.Items.Add("motorola") End If In DropDownList1_SelectedIndexChanged If (DropDownList1.SelectedIndex = 0) Then DropDownList2.Items.Clear() DropDownList2.Items.Add("6600") DropDownList2.Items.Add("1100") DropDownList2.Items.Add("2600") ElseIf (DropDownList1.SelectedIndex = 1) Then DropDownList2.Items.Clear() DropDownList2.Items.Add("S6600") DropDownList2.Items.Add("S1100") DropDownList2.Items.Add("S2600") Else DropDownList2.Items.Clear() DropDownList2.Items.Add("M6600") DropDownList2.Items.Add("M1100") DropDownList2.Items.Add("M2600") End If I think this is one of the way to do. rs_net

          C 1 Reply Last reply
          0
          • C chubbie

            here's the situation: is this possible to be done..? i have 2 dropdown list boxes (named A and B for easy reference).. in A, i have 3 items (nokia, samsung, motorola).. my intention is, when i select one of the items from A (nokia), i want the details to display at B (models: 8210, 8250.....). den when i select (samsung) from A, the display at B will be the models for samsung phones. can this be done..? what is the code that make this possible..? thanks for the help.. very much appreciated..:-D -DarkangeL-

            S Offline
            S Offline
            Sathiyaraj Ganesan
            wrote on last edited by
            #5

            Set the AutoPostBack Property of the List A to True,Then you can see the magic...;) Sathiyaraj Ganesan

            1 Reply Last reply
            0
            • C chubbie

              here's the situation: is this possible to be done..? i have 2 dropdown list boxes (named A and B for easy reference).. in A, i have 3 items (nokia, samsung, motorola).. my intention is, when i select one of the items from A (nokia), i want the details to display at B (models: 8210, 8250.....). den when i select (samsung) from A, the display at B will be the models for samsung phones. can this be done..? what is the code that make this possible..? thanks for the help.. very much appreciated..:-D -DarkangeL-

              R Offline
              R Offline
              RSArockiam
              wrote on last edited by
              #6

              use SelectedIndexChanged event of the A dropdownlist to populate the data in B dropdownlist box. Regards R.Arockiapathinathan

              1 Reply Last reply
              0
              • P PrakashBhaskar

                Hi, From where you populate this values i mean do you have seperate table. Thanks Warm Regards Prakash-B

                C Offline
                C Offline
                chubbie
                wrote on last edited by
                #7

                i can create individual tables for the 3 different items' (nokia, samsung, motorola) model number. like one table for nokia models, 2nd table for samsung, and 3rd table for motorola.. but is it possible to combine the 3 tables together..? -DarkangeL-

                S 1 Reply Last reply
                0
                • C chubbie

                  i can create individual tables for the 3 different items' (nokia, samsung, motorola) model number. like one table for nokia models, 2nd table for samsung, and 3rd table for motorola.. but is it possible to combine the 3 tables together..? -DarkangeL-

                  S Offline
                  S Offline
                  Sathiyaraj Ganesan
                  wrote on last edited by
                  #8

                  1.Add Nokia,Samsung,Motorola to List A manually. 2.Set Autopostback Property of List A to TRUE. 3.Double click List A,Then write the code for populating the corresponding value in List B from Table. Note: write the code on SelectedIndexChanged of List A. Sathiyaraj Ganesan

                  C 1 Reply Last reply
                  0
                  • C chubbie

                    here's the situation: is this possible to be done..? i have 2 dropdown list boxes (named A and B for easy reference).. in A, i have 3 items (nokia, samsung, motorola).. my intention is, when i select one of the items from A (nokia), i want the details to display at B (models: 8210, 8250.....). den when i select (samsung) from A, the display at B will be the models for samsung phones. can this be done..? what is the code that make this possible..? thanks for the help.. very much appreciated..:-D -DarkangeL-

                    I Offline
                    I Offline
                    Ista
                    wrote on last edited by
                    #9

                    really. Set up the datasources and bind them the 2nd will bind to the selected value of A 1 line of code equals many bugs. So don't write any!!

                    1 Reply Last reply
                    0
                    • S Sathiyaraj Ganesan

                      1.Add Nokia,Samsung,Motorola to List A manually. 2.Set Autopostback Property of List A to TRUE. 3.Double click List A,Then write the code for populating the corresponding value in List B from Table. Note: write the code on SelectedIndexChanged of List A. Sathiyaraj Ganesan

                      C Offline
                      C Offline
                      chubbie
                      wrote on last edited by
                      #10

                      hmm.. what if for both List (A & B), i want to diplay options extracted from the database..? simplify what i meant: Items in A and B have to be taken from Database. can the steps mentioned still be done..? and, what are the codes to be written..? thanks for the help. -DarkangeL-

                      1 Reply Last reply
                      0
                      • R rs_net

                        In page_Load DropDownList1.AutoPostBack = True If (Not Page.IsPostBack) Then DropDownList1.Items.Add("nokia") DropDownList1.Items.Add("samsung") DropDownList1.Items.Add("motorola") End If In DropDownList1_SelectedIndexChanged If (DropDownList1.SelectedIndex = 0) Then DropDownList2.Items.Clear() DropDownList2.Items.Add("6600") DropDownList2.Items.Add("1100") DropDownList2.Items.Add("2600") ElseIf (DropDownList1.SelectedIndex = 1) Then DropDownList2.Items.Clear() DropDownList2.Items.Add("S6600") DropDownList2.Items.Add("S1100") DropDownList2.Items.Add("S2600") Else DropDownList2.Items.Clear() DropDownList2.Items.Add("M6600") DropDownList2.Items.Add("M1100") DropDownList2.Items.Add("M2600") End If I think this is one of the way to do. rs_net

                        C Offline
                        C Offline
                        chubbie
                        wrote on last edited by
                        #11

                        hey.. mind giving me the exact codes..? with all the brackets and semi-colon etc..? i tried to incorporate the codes you gave me.. but there are some errors.. by the way.. just to let you know, i am using c-Sharp.. sorry for any incovenience caused..:-O thanks for the attention to my query..:) very much appreciated.. -DarkangeL- ^using c-sharp^

                        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