Ejemplo n.º 1
0
        protected void OnRowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            try
            {
                GridViewRow row = GridView1.Rows[e.RowIndex];
                string      id  = (row.FindControl("lblId") as Label).Text;

                db.DeletePaper(int.Parse(id));
            }
            catch (Exception ex)
            {
                exceptionLable.Text = ex.Message;
            }
            finally
            {
                GridView1.EditIndex = -1;
                this.BindGrid();
            }
        }