Saturday, February 19, 2011

Update with Data Source Control in asp.net

How do you run an update query in a data source control from a button? I have the data source control with the update query configured in it. I just don't know what to put in the button_click event to make it run.

From stackoverflow
  • In the event handler just call the Update method for your Datasource control.

  • I get an error when I call the Update method of the Datasource

    sdsUpdateName.Update;

    Only assignment, call, increment, decrement, and new object expressions can be used as a statement

  • aha I needed parenthesis after the update command

    sdsUpdateName.Update();

0 comments:

Post a Comment