Recently there has been much interest in using light to activate self-assembly of molecules in a fluid, leading to gelation. The advantage of light over other stimuli lies in its spatial selectivity, i.e., its ability to be directed at a precise location, which could be particularly useful in microfluidic applications. However, existing light-responsive fluids are not suitable for these purposes since they do not convert into sufficiently strong gels that can withstand shear. Here, we address this deficiency by developing a new light-responsive system based on the well-known polysaccharide, alginate. The fluid is composed entirely of commercially available components: alginate, a photoacid generator (PAG), and a chelated complex of divalent strontium (Sr(2+)) cations. Upon exposure to ultraviolet (UV) light, the PAG dissociates to release H(+) ions, which in turn induce the release of free Sr(2+) from the chelate. The Sr(2+) ions self-assemble with the alginate chains to give a stiff gel with an elastic modulus ∼2000 Pa and a yield stress ∼400 Pa (this gel is strong enough to be picked up and held by one's fingers). The above fluid is sent through a network of microchannels and a short segment of a specific channel is exposed to UV light. At that point, the fluid is locally transformed into a strong gel in a few minutes, and the resulting gel blocks the flow through that channel while other channels remain open. When the UV light is removed, the gel is gradually diluted by the flow and the channel reopens. We have thus demonstrated a remote-controlled fluidic valve that can be closed by shining light and reopened when the light is removed. In addition, we also show that light-induced gelation of our alginate fluid can be used to deposit biocompatible payloads at specific addresses within a microchannel.