I have read about 20 articles and I can't figure out what I have done wrong. I am trying to delete from a gridview. Below is the code. Any help is appreciated. <form runat='server'> <asp:SqlDataSource ID='dsTest' Runat='server' ConnectionString="<%$ ConnectionStrings:myCnn %>" SelectCommand="SELECT [ID], [Name], [Enabled], [FavoriteColor] FROM tblTest" UpdateCommand="UPDATE tblTest SET [Name] = @Name, [Enabled] = @Enabled, [FavoriteColor] = @FavoriteColor WHERE ID = @ID" DeleteCommand="DELETE FROM tblTest WHERE ID = @ID"> <DeleteParameters> <asp:Parameter name="ID" /> </DeleteParameters> </asp:SqlDataSource> <asp:GridView ID="gvTest" Runat='server' DataKeyNames='ID' AutoGenerateColumns='true' AutoGenerateEditButton='true' AutoGenerateDeleteButton='true' DataSourceID="dsTest" /></form>Exception Details: System.Data.SqlClient.SqlException: Must declare the variable '@ID'.
View Complete Post