Databinding Problem with Dropdownlist with Multiview Control in VB

G

Guest

I have a page that has multiview control that has two dropdown lists on it.
the dropdown controls ARE NOT inside of the multiview. Each drop down is
bound using its own sqldatasource conrtol. The multiview is declared below
the dropdown controls on another portion of the page.


so, here is the progression..

1) select a category from drowdown one that is bound using sqldatasource1
2) dropdown2 is populated based on selection or dropdown1 and sqldatasource2
3) use the ondatabound property for drowdown2 to add an item to the top of
the list (dropdown2.items.insert(0, "Select One"))


Here is the problem....

if the sqldatasources are not defined within the multiview, the ondatabound
function actually fires multiple times. It then results in the following
error:

"Input string was not in a correct format. "

I ran the program in debug mode, and noticed that my callback funtion was
entered two times for some reason, which means that the drowdown2 was bound
twice.

I struggled for hours before i figured out what was going on. To solve the
problem, I simply put the sqldatasources within the multiview tags, and it
work as planned. This is weird since the dropdown lists are declared before
the multiview and are not really associated with that control.

Any ideas why this is happening?
Is this a bug?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top