ObjectDataSource and FormView: How to manually load/save values? RRS feed

  • Question

  • User260076833 posted


    I have an ObjectDataSource and a FormView. When I edit a record, all the fields are loaded automatically and also saved automatically, when the user clicks the insert/update button.

    However, there is one attribute that is stored in a different table, and I would like to handle it in the same form.

    Of course, I could join the tables with a query, but to make it updatable, I would have to create instead of triggers. I would like to avoid this for this one attribute.

    For me it would be sufficient, if I could have an unbound field in my form which I load and save manually. But how would this be done?
    Which are the event handlers where I should load it and where I should save it? And within these handlers, how can I easily access the database (i. e. without explicitely creating and opening/closing a connection)?


    Monday, October 5, 2015 5:19 AM