A photoactive material has been synthesised in which azobenzene units are attached to a methyl methacrylate/2-hydroxyethyl methacrylate co-polymer and shows repeated photoresponsive switching upon irradiation at 365 nm and 254 nm with long term thermal stability. In combination with a direct UV-written silica-on-silicon Bragg grating, this has been used to fabricate a prototype optical device which undergoes reversible refractive index changes at telecom wavelengths. The 63 GHz tuning response demonstrated by this device has potential applicability for reconfigurable dispersion compensation for use in optical networks.