By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,357 Members | 1,021 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,357 IT Pros & Developers. It's quick & easy.

Databinding Problem with Dropdownlist with Multiview Control in VB

P: n/a
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

"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

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?
Jan 9 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.