dropdownlist problem
-
first of all i would like to say that i am very new to programming and also to .net . now i have a problem. i have two dropdownlists: 1) dropdownlist 1- having 2 items ex: male and female 2) dropdownlist 2_ having 4 items ex: dog, cat, fish, cow. now the problem is : if i select male then all the four options should be visible , but if i select female then dog, cat and cow will be visible but not fish. please send me the code both by help if items are hardcoded by itemlist and if we want to manipulate through database(sqlserver 2000). please help me , and reply me fast. thank you
-
first of all i would like to say that i am very new to programming and also to .net . now i have a problem. i have two dropdownlists: 1) dropdownlist 1- having 2 items ex: male and female 2) dropdownlist 2_ having 4 items ex: dog, cat, fish, cow. now the problem is : if i select male then all the four options should be visible , but if i select female then dog, cat and cow will be visible but not fish. please send me the code both by help if items are hardcoded by itemlist and if we want to manipulate through database(sqlserver 2000). please help me , and reply me fast. thank you
As fast as I could, it might not compile tho...
HAI
CAN HAS STDIO?
I HAS A dropdown1 ITZ ARRAY
I HAS A dropdown2 ITZ ARRAYBTW array assignments
LOL dog IN MAH dropdown2
LOL cat IN MAH dropdown2
LOL cow IN MAH dropdown2I HAS A gender IN MAH dropdown1 ITZ YARN
GIMMEH gender
IZ gender LIEK "male"?
YARLY
BTW the male case
LOL fish IN MAH dropdown2
NOWAI
BTW the female case, no other assignment necessaryKTHX
KTHXBYE
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.” -Edsger Dijkstra
-
first of all i would like to say that i am very new to programming and also to .net . now i have a problem. i have two dropdownlists: 1) dropdownlist 1- having 2 items ex: male and female 2) dropdownlist 2_ having 4 items ex: dog, cat, fish, cow. now the problem is : if i select male then all the four options should be visible , but if i select female then dog, cat and cow will be visible but not fish. please send me the code both by help if items are hardcoded by itemlist and if we want to manipulate through database(sqlserver 2000). please help me , and reply me fast. thank you
if(Listbox1.Text=="Female") { Listbox2.Items.Clear(); ListBox2.Items.Add("dog"); ListBox2.Items.Add("cat"); ListBox2.Items.Add("cow"); } else if(Listbox1.Text=="Male") { Listbox2.Items.Clear(); ListBox2.Items.Add("dog"); ListBox2.Items.Add("cat"); ListBox2.Items.Add("fish"); ListBox2.Items.Add("cow"); }