Updating is not supported by data source sqldatasource1 unless updatecommand
Deleting is not supported by data source 'Gridview Data Source' unless Delete Command is specified.Description: An unhandled exception occurred during the execution of the current web request.Update Your SQLData Source is missing "Delete Parameters" (MSDN Link).Update your SQLData Source to include Delete Parameters as follows (you'll need to update things like the Connection String and Control IDs of the Control Parameters): Apart from this remember to use a primary key in your table on which you will be running this Delete command.
NET developer and trying to use a Grid View control to show all the employees in the employee table in the database. I already changed the property Delete Command Type of my SQLData Source to Stored Procedure. UPDATE This is what I did, but I am missing something, I can't compile: This is what I did at .cs: " Select Command="SELECT [bruker Id], [kjoptekvoten], [pengeneutbetalt], [fyringsolje], [biltype], [kjoptid] FROM [Informasjon]" Delete Command Type="Stored Procedure" Delete Command="DELETE FROM [Informasjon] WHERE fyringsolje='Kull: 2,42 kg';" Is the configuration for the datasource correct? NET and I am not very familiar with all the terminology. For more info on the connectionstring please read : https://msdn.microsoft.com/en-us/library/sqlclient.sqlconnection.connectionstring(v=vs.110)" Select Command="SELECT [bruker Id], [kjoptekvoten], [pengeneutbetalt], [fyringsolje], [biltype], [kjoptid] FROM [Informasjon]" Delete Command Type="Stored Procedure" On Selecting="transactions Sql Data Source_Selecting"If you add the tag Delete Command="Stored Procedure Name" It will use the specified storedprodedure.Dont worry if you see that the delete command does not use parameters like the one above, it is just for a homework(I only need the query to pass). Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.