public void grdItemBreakDown_DeleteCommand(object sender, DataGridCommandEventArgs e) { String DetailId = ""; DetailId = grdItemBreakDown.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString(); contingency _wc = new contingency(); _wc.DeleteProjectItemBreakdown(Convert.ToInt32(DetailId)); //BindItemBreakDown(Convert.ToInt32(ViewState["EstNum"].ToString())); Server.Transfer("whitfield_estimation.aspx?EstNum=" + ViewState["EstNum"].ToString()); }