sqlDataSource insert 2 tables RRS feed

  • Question

  • User1898866688 posted

    Hi all, I created a form view that included a drop down list insert. This form view i bind with TableA.

    For this drop down list (categoryId), i use datatextfield to get data. Howver, i create another textbox that allow user to create their own category.

    This tableB included (category Id, category Name).

    How can i bind with TableA after user click button to insert their data?

    Mean that insert into both tables and drop down list will bind with new data.


    Thank you.



    Thursday, March 10, 2011 2:17 AM


  • User1288251396 posted

    I think you want to create an FormView.ItemCommand handler that checks the TextBox and does a separate insert.  It would also need to re-bind your DropDownList.

    Check out this MSDN article: FormView.ItemCommand

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 10, 2011 9:57 AM