protected void lbDelete_Click(object sender, EventArgs e) { ImageButton linkButton = new ImageButton(); linkButton = (ImageButton)sender; bool result = StatesManager.DeleteStates(Convert.ToInt32(linkButton.CommandArgument)); StatesManager.LoadStatesPage(gvStates, rptPager, 1, ddlPageSize); }