Hydrophobically modified poly[2-(diethylamino)ethylmethacrylate-co-N-vinyl- 2-pyrrolidone/octadecyl acrylate) [P(DEAEMA-co-NVP/OA)] hydrogels were synthesized by free-radical crosslinking copolymerization of 2-(diethylamino)ethylmethacrylate (DEAEMA), N-vinyl-2pyrrolidone (NVP) with different amounts of hydrophobic comonomer octadecyl acrylate (OA) in ferf-butanol with ethylene glycole dimethacrylate (EGDMA) as a crosslinker. The swelling equilibrium of the hydrogels was investigated as a function of temperature and hydrophobic comonomer content in aqueous solutions of the anionic surfactant sodium dodecyl sulfate (SDS) and the cationic surfactant dodecyltrimethylammonium bromide (DTAB). The results indicated that the swelling behavior and temperature sensitivity of the hydrogels were affected by the type and concentration of surfactant solutions. Additionally, the amount of the adsorbed SDS and DTAB molecules onto the hydrogels was determined by fluorescence measurements. An increase of OA content in the hydrogel caused an increase in the amount of adsorbed surfactant mole cules in both media. © 2006 Wiley Periodicals, Inc.