How to delete members from ASp.NET membership database on gridview selected item?
I have a list of registered users in gridview...
I want when i click on delete button on selected item in gridview, then the record of user will be deleted from the whole database... on single delete com开发者_运维知识库mand of sqldatasource in gridview....
You should use the DeleteCommand from the grid and specify the parameter:
DeleteCommand ="DELETE FROM TBL WHERE ID=@id"
<DeleteParameters>
<asp:Parameter Name="id" Type="Int32" />
</DeleteParameters>
精彩评论