if (ddlDeposite.SelectedItem.Text == "Normal Savings") { int indexOfOnDepositForNormalSavings = -1; indexOfOnDepositForNormalSavings = ddlInterestCalculationPeriod.Items.IndexOf(ddlInterestCalculationPeriod.Items.FindByValue("5")); ddlInterestCalculationPeriod.Items.RemoveAt(indexOfOnDepositTypeForNormalSavings); int indexOfMaturity = -1; indexOfMaturity = ddlInterestCalculationPeriod.Items.IndexOf(ddlInterestCalculationPeriod.Items.FindByValue("6")); ddlInterestCalculationPeriod.Items.RemoveAt(indexOfMaturity); } if (ddlDeposite.SelectedItem.Text == "Recurring Savings") { int indexOfOnDepositForRecuringSavings = -1; indexOfOnDepositTypeForRecuringSavings = ddlInterestCalculationPeriod.Items.IndexOf(ddlInterestCalculationPeriod.Items.FindByValue("5")); ddlInterestCalculationPeriod.Items.RemoveAt(indexOfOnDepositTypeForRecuringSavings); }
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)