Billy
Billy

Reputation:

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.

Upvotes: 0

Views: 995

Answers (3)

Billy
Billy

Reputation:

aha I needed parenthesis after the update command

sdsUpdateName.Update();

Upvotes: 1

Billy
Billy

Reputation:

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

Upvotes: -1

Ken Pespisa
Ken Pespisa

Reputation: 22284

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

Upvotes: 1

Related Questions