void Repeater_ItemCommand(Object Sender, RepeaterCommandEventArgs e) { if( e.CommandName == "Delete" ) { int id = e.CommandArgument.ToString().Numeric(); db.SPs.SpDeleteAccount(id).Execute(); // the rest of your code } }