With the rapid development of modern industry, water pollution has become an intractable environmental issue facing humans worldwide. In particular, the organic dyes discharged into natural water from dyestuffs, dyeing and the textile industry are the main sources of pollution in wastewater. To eliminate these types of pollutants, degradation of organic contaminants through a photocatalytic technique is an effective methodology. To exploit more crystalline photocatalysts for the degradation of organic dyes, two coordination polymers, namely catena-poly[[(3,5-dicarboxybenzene-1-carboxylato-κO)silver(I)]-μ-trans-1-(pyridin-3-yl)-2-(pyridin-4-yl)ethene-κN:N'], [Ag(CHO)(CHN)] or [Ag(HBTC)(3,4'-bpe)], (I), and poly[[(μ-5-carboxybenzene-1,3-dicarboxylato-κO,O:O:O)[μ-trans-1-(pyridin-3-yl)-2-(pyridin-4-yl)ethene-κN:N']cadmium(II)] monohydrate], {[Cd(CHO)(CHN)]·HO} or {[Cd(HBTC)(3,4'-bpe)]·HO}, (II), have been prepared by the hydrothermal reactions of benzene-1,3,5-tricarboxylic acid (HBTC) and trans-1-(pyridin-3-yl)-2-(pyridin-4-yl)ethene (3,4'-bpe) in the presence of AgNO or Cd(NO)·4HO, respectively. These two title compounds have been structurally characterized by IR spectroscopy, elemental analysis, single-crystal X-ray diffraction and powder X-ray diffraction. In (I), the Ag ions and organic ligands form a one-dimensional coordination chain, and adjacent coordination chains are connected by Ag...O interactions to give rise to a two-dimensional supramolecular network. Each two-dimensional network is entangled with other equivalent networks to generate an infrequent interlocked 2D→3D (2D and 3D are two- and three-dimensional, respectively) supramolecular framework. In (II), the Cd ions are bridged by the HBTC and 3,4'-bpe ligands, which lie across centres of inversion, to give a two-dimensional coordination network. The thermal stabilities and photocatalytic properties of the title compounds have also been studied.