When i give empty value to bank region and cost centre it gives the error during saving to database.
Error:input string was not in a correct format.
objMEndorsement.BankRegion = Convert.ToInt32(txtBankRegion.Text);
objMEndorsement.CostCenter = Convert.ToInt32(txtCostCenter.Text);
this is the code i used.How i will save empty textbox value to database.
int.int?emptyornullvalues before trying to convert toint. like this -string.IsNullOrWhiteSpace(txtBankRegion.Text)