开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜