我想要的是在我的datagridview中刪除記錄之前有一個確認。請檢查我的代碼..謝謝。如何把一個確認在超鏈接DataGridView
這裏是我的asp.net代碼:
<ItemTemplate><asp:HyperLink ID="hlnk_Delete" runat="server" style="width:100px; margin-left:50px; margin-right:100px"
NavigateUrl='<%# "Components/DeleteBook.aspx?SKU=" + Utility.SKUMask(Eval("lbhc_lb_sku").ToString()) %>'>Delete</asp:HyperLink></ItemTemplate>
的SqlDataSource:
<asp:SqlDataSource ID="sds_PublishedBookListings" runat="server" ConnectionString="<%$ ConnectionStrings:learningisfunConnectionString %>"
SelectCommand="SELECT dbo.lif_bookshascategory.lbhc_lc_id,dbo.lif_books.lb_sku, dbo.lif_bookshascategory.lbhc_lb_sku, dbo.lif_category.lc_category, dbo.lif_books.lb_title, dbo.lif_bookshascategory.lbhc_level FROM dbo.lif_bookshascategory INNER JOIN dbo.lif_category ON dbo.lif_bookshascategory.lbhc_lc_id = dbo.lif_category.lc_id INNER JOIN dbo.lif_books ON dbo.lif_bookshascategory.lbhc_lb_sku = dbo.lif_books.lb_sku WHERE (dbo.lif_books.lb_status = 'publish') and lbhc_level = 1 "
DeleteCommand="DELETE FROM lif_books FROM lif_books INNER JOIN lif_bookshascategory ON lif_books.lb_sku = lif_bookshascategory.lbhc_lb_sku WHERE (lif_books.lb_sku = @lbhc_lb_sku) OR (lif_bookshascategory.lbhc_lb_sku = @lbhc_lb_sku)">
<DeleteParameters>
<asp:Parameter Name="lb_sku" Type="String" />
</DeleteParameters>
</asp:SqlDataSource>
確定。其工作表示感謝! – 2011-04-12 06:30:58