Is this an ASP.NET application? If so, set the ComboBox's EnableViewState
property to False.
[quoted text, click to view] "Coderacer" <srikalyanp@gmail.com> wrote in message
news:1154457706.584551.168180@i3g2000cwc.googlegroups.com...
> Hi
>
> I have an Array(20) and 2 ComboBoxes in my form class. My idea is to
> add items of Array to ComboBox2 in such a way that if, say, you make a
> choice A in ComboBox1, Array items 1 thru 10 will get added; If you
> choose choice B in ComboBox1, Array items 1-20 items gets added to
> ComboBox2. So far so good, BUT THE PROBLEM IS
>
> When I start the form and make a selection A in ComboBox1, Array items
> 1thru 10 are getting added without a problem. Now if I choose B in
> ComboBox1, Array items 1 thru 20 are getting APPENDED to already
> existing 1 thru 10 items from previous selection. I tried to write
> following code to refresh the ComboBox selections, when I ever I change
> SelectIndexChanged for ComboBox1, but no success. Can anybody please
> help, I appreciate any help. Thank you.
>
> N = Integer.Parse(ComboBox2.Items.Count)
> MsgBox("N")
> For L = 0 To N - 1
> ComboBox2.Items.RemoveAt(L)
> Next L
>