Dropdownlist dynamically populating

Avatar

Avatar

sonya1

Avatar

sonya1

sonya1

03-03-2014

HI,

I have an dropdown which has an custom entry. After user enter some item in that dropdown. The user click on add instance button where whole page gets added but in the next page that dropdown get empty.

How can I get the values present even though when user click on add instance. Please help

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

Magus069

MVP

Avatar

Magus069

MVP

Magus069
MVP

04-03-2014

It gets empty probably because it is empty initially.. so you have to repopulate it each time this drop down list is created...

Each time you click on the add instance button you should add the code to add the items in the new drop down list.

When you get the drop down list values from the inital object, always get the one in the 0 instance

and when you insert the list values inside the new drop down list use the count instance - 1

you can add items in the drop down list using

dropdownlist1.addItem(strValue, strValue);