Based on the viologen ligand 1-(4-carboxybutyl)-4,4 '-bipyridinium bromide (HCPbpyBr), three new complexes with different auxiliary ligands and metal ions have been prepared and structurally characterized, namely Ni(CPbpy)(H4BTEC)(0.5)(H2O)(4)<middle dot>(BTEC)(0.5)<middle dot>2H(2)O (1), Co(CPbpy)(H4BTEC)(0.5)(H2O)(4)<middle dot>(BTEC)(0.5)<middle dot>2H(2)O (2) and [Cd(CPbpy)(m-BDC)<middle dot>2H(2)O](n) (3) (1,2,4,5-benzenetetracarboxylic acid = H4BTEC, 1,3-benzenedicarboxylic acid = m-H2BDC). Complexes 1 and 2 have identical isolated structure, while complex 3 features a three-dimensional (3D) framework. Meanwhile, complex 3 exhibits electron-transfer (ET) UV and X-ray dual photochromism and photo-controlled luminescent properties, while photochromism is not observed in complexes 1 and 2. Additionally, complex 3 has the prospective application as an inkless and erasable printing material because of its excellent photochromic property.