Esempio n. 1
0
    protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        TableCell cell = GridView1.Rows[e.RowIndex].Cells[0];

        iid.Text = cell.Text;
        DeleteTrail.Insert();
    }
Esempio n. 2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        int y = 0, x = 0;

        DataView dv2 = (DataView)SqlDataSource1.Select(DataSourceSelectArguments.Empty);

        foreach (DataRow dr in dv2.Table.Rows)
        {
            x        = (int)dv2.Table.Rows[y][0];
            iid.Text = x.ToString();
            DeleteTrail.Insert();
            y++;
        }
        SqlDataSource2.Delete();
        Response.Redirect("~/Maintenance/facilities.aspx");
    }