Monday, August 16, 2010

How to delete row on a gridview using ASP .NET?

Im using Visual Web developer 2008 express edition. The database that Im using is MS Access. I can insert and select.





The problem is when i view the database thru Gridview I have a commandfield that delete a certain record.





I use parameter for my deletecommand on my datasource. but i always got this error:





ERROR [07002] [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.How to delete row on a gridview using ASP .NET?
You haven't specified the identifier used to delete the record. Post your grid and datasource code here.





The paramwing is not a datakey nor is it a column. Try adding it as a datakey or a bound column then hide it.

No comments:

Post a Comment