I have got a insert and select working as at the moment i have a page that shows the details on the page and then i want the user to change something then click update and then it would update the database and refresh the page with the new data.

Thanks Mike I set the field i wanted to change in the query without the parameter to 1 and it updated fine, the problem is that its not picking up my selected index properly!

updating data in sql database in asp net-68

In a single database we can create any number of data tables.

It's like a school with many classrooms and each classroom will have different school students.

NET, and now getting into the depths of database interaction!

This is probabaly a really easy solution, but i want a simple example of how to update a field in database?

Find the connection string then copy that connection string Once you have copied the connection string go to your web site solution explorer.

Find the web.config file open that web.config file. Then Drag and drop a gridview to the page from the tool box then do the following as shown in below. Add - Edit Delete buttons from the command field and check on the auto generate fields.

The Selected Value property should reflect the current value at that moment.

I'm not sure why you aren't seeing your currently selected value in the update.

Your issue has nothing to do with the update itself.