suvmitra
asked on
Array c#, asp.net
I have two combo boxes at my default.aspx page. in the page lode event i am populating combobox1 with say A,B,C.
What I need is..say user is selecting a value from combobox1 .. say 'B'..combobox2 will then reload its values except the value already chosen in combobox1..eg 'B'...so combobox2 will show 'A','C' only.
Please help me with C# code example. Thank you.
What I need is..say user is selecting a value from combobox1 .. say 'B'..combobox2 will then reload its values except the value already chosen in combobox1..eg 'B'...so combobox2 will show 'A','C' only.
Please help me with C# code example. Thank you.
You have to a autopostback on the control...And on click event
do the databind on combo box 2 but after doing the databind remove the value from the comboox
http://www.google.com/search?hl=en&source=hp&biw=1600&bih=842&q=combobox.items.remove&aq=0&aqi=g1&aql=&oq=combobox.items.re
http://www.google.com/search?hl=en&source=hp&biw=1600&bih=842&q=combobox.items.remove&aq=0&aqi=g1&aql=&oq=combobox.items.re
This is a good sample:
http://asp-net-example.blogspot.com/2011/02/ajax-combobox-how-to-set-change_08.html
http://asp-net-example.blogspot.com/2011/02/ajax-combobox-how-to-set-change_08.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ignore the asp:textbox
ASKER
Excellent! Thank you.