protected void Delete_Click(object sender, EventArgs e) { LinkButton b = (LinkButton)sender; int ColorId = int.Parse(b.CommandArgument); ColorController cc = new ColorController(); cc.Delete(ColorId); rptColor.DataSource = cc.GetColors(); rptColor.DataBind(); }