Here, we demonstrate an all-silicon photonic switch, working at an infrared communication wavelength and pumped by spatial light, where a ring resonator and a metasurface absorber are both designed in photonic crystals and monolithically integrated on a silicon-on-insulator wafer. Through selective doping, the absorber gets a pump absorption completely different from near zero of the resonator. Based on the thermo-optical effect, the device is capable of tuning the wavelength of the guided mode by $\sim{341}\;{\rm pm/mW}$∼341pm/mW and switching in time $ {\lt} {1.0}\;\unicode{x00B5} {\rm s}$<1.0µs to the pump response. The high responsivity and switching speed as well as all-silicon processing techniques make the design potentially for free-space optical communication and detection.