Databinding Problem with Dropdownlist with Multiview Control in VB

Discussion in 'Microsoft ASP .NET' started by Guest, Jan 9, 2006.

  1. Guest

    Guest 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?
     
    Guest, Jan 9, 2006
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    8
    Views:
    267
    tshad
    Oct 19, 2005
  2. Brad Isaacs

    Menu Control with Multiview Control ???

    Brad Isaacs, Feb 8, 2007, in forum: Microsoft ASP .NET
    Replies:
    5
    Views:
    261
    Brad Isaacs
    Feb 9, 2007
  3. Yin99

    Menu control with Target MultiView Control?

    Yin99, Aug 17, 2007, in forum: Microsoft ASP .NET
    Replies:
    1
    Views:
    340
    Guest
    Aug 20, 2007
  4. iHavAQuestion
    Replies:
    0
    Views:
    415
    iHavAQuestion
    Apr 28, 2008
  5. Andy B
    Replies:
    0
    Views:
    274
    Andy B
    Dec 29, 2008
Loading...

Share This Page