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?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Nathan Sokalski
    Replies:
    2
    Views:
    415
    Guest
    Jun 15, 2005
  2. tshad
    Replies:
    8
    Views:
    482
    tshad
    Oct 19, 2005
  3. Mavenos

    Ajax and .net multiview control

    Mavenos, Feb 2, 2006, in forum: Microsoft ASP .NET
    Replies:
    1
    Views:
    416
  4. Replies:
    1
    Views:
    250
    Guest
    Feb 14, 2006
  5. Brad Isaacs

    Menu Control with Multiview Control ???

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

    Menu control with Target MultiView Control?

    Yin99, Aug 17, 2007, in forum: Microsoft ASP .NET
    Replies:
    1
    Views:
    477
    Guest
    Aug 20, 2007
  7. iHavAQuestion
    Replies:
    0
    Views:
    936
    iHavAQuestion
    Apr 28, 2008
  8. Andy B
    Replies:
    0
    Views:
    463
    Andy B
    Dec 29, 2008
Loading...