The interaction of 2-halo-functionalized imidazolium derivatives (n-X+, X = Cl, Br, I) with chloride anion via ion-pair halogen bonds (n-X center dot Cl) was studied by means of DFT and ab initio calculations. A method benchmark was performed on 2-bromo-1H-imidazol-3-ium in association with chloride (1-Br center dot Cl), MP2 yielding the best results when compared with CCSD(T) calculations. The interaction energies (Delta E) in the gas-phase are high and, although the electrostatic interaction is strong owing to the ion-pair nature of the system, large X center dot center dot center dot Cl- Wiberg Bond orders and contributions from charge transfer (n(Cl) ->sigma*C-X) are obtained. These values drop considerably in chloroform and water showing that solvent plays a role in modulating the interaction and that gas-phase calculations are particularly unrealistic for experimental applications. The introduction of electron withdrawing groups in the 4,5-positions of the imidazolium (e.g. -NO2, -F) increases the halogen bond strength both in gas-phase and in solvent, including water. The effect of the substituents on the 1,3-positions (N-H groups) also depends on the solvent. The variation of Delta F can be predicted via a two-parameter linear regression which optimizes the weights of charge-transfer and electrostatic interactions, which are different in vacuum and in solvent (chloroform and water). These results could be used in the rational design of efficient chloride receptors based on halogen bonds that work in solution, in particular in aqueous environment.