Delete Confirmation??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vivek kushwaha
    New Member
    • Feb 2008
    • 7

    Delete Confirmation??

    Hi,
    i have codes like this.

    code behind page

    Code:
    Private Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.ItemCommand
    If e.CommandName = "changestatus" Then
                clsMaster.ExecuteQry("update CaseMaster set Cancel = 'N', CanceledBy = '', CancelReason='', Reason1='', Notes='' where caseid=" & e.Item.Cells(1).Text & "")
                    clsMaster.GridDatashow(DataGrid1, Session("Strqry"))
            End If
    End Sub
    aspx page code on datagrid1

    Code:
    <asp:TemplateColumn HeaderText="Reopen">
    												<ItemStyle HorizontalAlign="left" Width="80px"></ItemStyle>
    												<ItemTemplate>
    													<asp:button CausesValidation="False" id="cButton" CommandName="changestatus"  runat="server"
    														Text="Reopen Case" CssClass="button"></asp:button>
    												</ItemTemplate>
    											</asp:TemplateColumn>
    Finally i have to delete record to press above button. But i want a confirmation dialog box before deletion.
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    You should be able to run a JS command via attribute add immediately before executing the update. HTH.

    Comment

    Working...