Use sqldataadapter to update from databound textbox

Discussion in 'ASP .Net' started by Benny Dein, Jan 8, 2006.

  1. Benny Dein

    Benny Dein Guest

    Hi

    A newbie question regarding using update function on sqldataadapter:

    I have created a connection, a dataadapter and a dataset on my webform.
    I have put a texbox on my webform to show a value from a certain field on a
    selected record.
    The textbox is databound to my datatable and shows as wanted the value in
    the sql selected row.

    Now I want to update the value by changing its value on the webform and
    submit the form.

    In the background code I do an update on the dataadapter, but the the new
    value are not written to the database.

    It seems as I missed something.

    To load the data to my textbox I use the databind command.
    Do I have to execute another method to read the value from the textbox (and
    other controls) back to the datatable or how do I do that?
    Of course I could read the value directly from the textbox and put it into
    the datarow in background but it seems strange that it should be necesarry
    to move the values from the webform one by one, since they are databound and
    should know where to put the values, when the form is submitted.

    So what am I missing here?

    Thanks in advance!

    Benny
     
    Benny Dein, Jan 8, 2006
    #1
    1. Advertising

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. zhaoJian
    Replies:
    0
    Views:
    1,038
    zhaoJian
    Nov 6, 2003
  2. John Rose
    Replies:
    4
    Views:
    6,606
    John Rose
    Dec 24, 2003
  3. =?Utf-8?B?bWF0dGll?=

    SqlDataAdapter Update

    =?Utf-8?B?bWF0dGll?=, Jun 16, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    573
    =?Utf-8?B?bWF0dGll?=
    Jun 16, 2005
  4. rodchar
    Replies:
    0
    Views:
    399
    rodchar
    Nov 26, 2007
  5. Manu
    Replies:
    0
    Views:
    177
Loading...

Share This Page