The preparation of photocurable polymer membranes selective to anionic surfactants and their application to all-solid state ion-selective electrodes are reported. A preliminary trial employing CHEMFET devices is also shown. Membranes are based on a urethane-acrylate polymer, and use 2-cyanophenyl octyl ether (CPOE), a plasticizer compatible with the photocuring process. These membranes are highly selective to the anionic surfactants assayed while common inorganic anions did not interfere. An optimization methodology is proposed for their formulation, suited to the final application. Several membrane compositions were obtained, using between 44 and 48% (w/w) CPOE. A membrane with a general-purpose formulation is fully characterized, and we show calibration results for anionic surfactants such as dodecylbenzenesulfonate (DBS-), tetrapropylenebenzenesulfonate and dodecylsulfate, or cationic surfactants such as Hyamine 1622 and cetyltrimethylammonium ion. With the primary ion DBS- we verified a 58.1 mV/dec sensitivity, a linear response between 1 × 10-3 M and 3 × 10-6 M, a detection limit corresponding to 0.26 ppm DBS- (7.9 x 10-7 M) and a slope precision of 2.8% RSD between days.