Inserting updating and deleting data with the sqldatasource Adult dating website template
There’s a Click event handler assigned to the Add Button.When the Button is clicked, the Insert function of the Sql Data Source is executed which then inserts the records to the database and binds the Grid View again to display the newly inserted record.
When you want to update/delete, you use the database ID number to institute the changes. Insert(); I put in your lines, which were slightly diff then mine, took out the defaultvalue lines, but no record is getting inserted, just error on page, no asp error is showing. Now where getting somewhere, it was a null value issue(why do I even have them defined that way? I cannot do this by setting the Insert Command property to an INSERT statement.What I found is that I could use a Stored Procedure. Could I attache some C# code to the Sql Data Source that does the insert?