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") Response.Write("<script type=text/javascript>alert('item not deleted')</script>") NoDataLabel.Text = "item not deleted" End If Catch ex As Exception MsgBox(ex.Message) End Try End Sub
ScriptManager.RegisterStartupScript(this,this.GetType(), DateTime.Now.Tostring(), "alert('Hi');",true);
Response.Write("<script language='javascript'>alert('item not deleted');</script>")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)