kewNedNetty
New Member
Hi,<BR><BR>I'm developing a Admin Interface to add and delete records from a mdb table on asp.net, and I get this error just when I put the code to delete. <BR><BR>The new code I had put is the following:<BR><BR>A) The delete Procedure:<BR><BR> Sub DBAddDataGrid_Delete(Sender As Object, E As DataGridCommandEventArgs)<BR><BR> Dim DeleteCmd As String = "DELETE from tbdownloads where IdF = @Id"<BR><BR> objCommand = New OleDbCommand (DeleteCmd, objConnection)<BR> objCommand.Parameters.Add(New OleDbParameter("@Id", OleDbType.VarChar, 11))<BR> objCommand.Parameters("@Id").Value = http://aspmessageboard.com/archive/index.php/DBAddDataGrid.DataKeys(CInt(E.Item.ItemIndex))<BR><BR> MyCommand.Connection.Open()<BR><BR> MyCommand.Connection.Close()<BR><BR> ShowDataGrid()<BR> End Sub<BR><BR>B) The colums tag added into <asp:datagrid.....></><BR><BR><BR> <Columns><BR> <asp:ButtonColumn Text="Delete Employee" CommandName="Delete"/><BR> </Columns><BR><BR>C) And the Error I get is:<BR><BR>Server Error in '/' Application.<BR>--------------------------------------------------------------------------------<BR><BR>Parser Error <BR>Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. <BR><BR>Parser Error Message: The server tag is not well formed.<BR><BR>Source Error: <BR><BR>Line 150:<center><BR>Line 151:<ASP
ataGrid id="DBAddDataGrid" runat="server"<BR>Line 152: Width="100%"<BR>Line 153: BackColor="white" <BR> <BR><BR>Any Ideas??<BR><BR>Thanks For your Time!!<BR>Salvador Gallego.Try either:<BR><BR><Columns><BR><asp:ButtonColumn Text="Delete Employee" CommandName="Delete" /><BR></Columns><BR> having a " " from your last attribute and the closing "/" or<BR><BR><Columns><BR><asp:ButtonColumn Text="Delete Employee" CommandName="Delete"></asp:buttoncolumn><BR></Columns><BR>Thanks aniway, it was a good attempt, <BR><BR>any other ideas? I'm at the limit...<BR><BR>Can you post more of your code. It could be somewhere else.Hi, <BR><BR>I can't access to the code till monday because I'm right now quite far of my home, in a little 3 day's holidays, aniway, my e-mail is [email protected], so if you could send me yours I'll send you my code on monday...<BR><BR>I'll also try to debugg it on monday and maybe I can do something by my own, but this time I don't have any idea of where the trouble could be...<BR><BR>Thanks aniway,<BR><BR>Salvador Gallego.<BR>(sorry for my pour grammar).
