Photonic crystals have many potential applications because of their ability to control lightwave propagation. We have investigated the electro-optical resonant switching in two-dimensional photonic crystal structures. The optical microcavity side coupled with a waveguide composed of a dielectric cylinder in air is studied by solving Maxwellʼs equations using the plane wave expansion method and finite-difference time-domain method. The switching mechanism is a change in the conductance of the microcavity and hence modulating the resonant mode and eventually resonant switching is achieved. Such a mechanism of switching should open up a new application for designing components in photonic integrated circuits.