コード例 #1
0
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        try
        {
            GridViewRow row         = (GridViewRow)GridView1.Rows[e.RowIndex];
            Label       lbldeleteid = (Label)row.FindControl("lblID");
            bl.item_id = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value.ToString());
            dl.delete_item_master(bl);
            ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('Delete Successfully'); window.location='item_msater.aspx';", true);

            grid();
        }
        catch (Exception ex)
        {
        }
    }