Protected Sub Delete_onGridRow_Click(ByVal sender As Object, ByVal e As EventArgs) Try ostate = New BLstate str = DirectCast(sender, System.Web.UI.WebControls.ImageButton).CommandName.ToString With ostate .stateid = str End With result = state.state_delete(ostate) If result > 0 Then gvList.DataSource = state.Listview(txtstate.Text, ddstateStatus.SelectedValue) gvList.DataBind() 'Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "alert", "alert('item not deleted');", True) 'Page.ClientScript.RegisterStartupScript(Me.GetType, "alert", "showDialog('Warning','Item not deleted.','warning');", True) 'Response.Write("item not deleted") ScriptManager.RegisterStartupScript(Me, Me.GetType, "alert",script, True) End If Catch ex As Exception MsgBox(ex.Message) End Try End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)