I am trying to add a delete link button to a daragrid in asp.net 1.1. I have the link button in and code from MSDN that looks like it gets intot he correct position of datagrid when I do a response.write index it looks at the correct rows. But my delete functionality does not work. How can i delete that row from the table where the StrRecordNumber is equal to itself.
THIS IS MY LINK BUTTON IN DATAGRID
<asp:linkbutton id="lnkDelete" runat="server" text="Delete" commandname="Delete"></asp:linkbutton>
THIS IS MY CODE BEHIND THAT GETS AT THE DATAGRID ROW.
Private Sub DataGrid1_DeleteCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs)Handles myDataGrid.DeleteCommand
Dim index As Integer
index = e.Item.ItemIndex
insertUpdateDelete("delete table1 where strRecordNumber = '" & ID & "'")
Insertupdate delete calls out my connectionstring from my common.vb file.