An efficient photochemical method for the site-specific immobilization and patterning of (bio)molecules inside glass capillary tubes is reported. The strategy involves the photodeprotection of reactive aminooxy groups on surfaces and subsequent reaction with aldehyde containing (bio)molecules.