Cyanoacetanilide (1) was reacted with aminocrotonitrile to give the corresponding 1,2- dihydropyridine (3). Also, 4,6-dimethyl-2-oxo-6-1,2-dihydro-pyridine-3-carbonitriles (7) was synthesized and subjected to some electrophilic reagents to produce compounds 8, 9 and 11. Ternary condensation of (1), aldehyde, and malononitrile (1:1:1 molar ratio) produced aminopyridines (14a-c). Compound (14b) was used in the synthesis of pyrido[2,3-d]pyrimidines 20 and 23 upon treatment with formamide and acetic anhydride respectively. Structures of the titled compounds cited in this article were elucidated by spectrometric data (IR, 1H NMR, and EMS).