Biocompatible crosslinked polymers, and methods for their preparation and use, are disclosed in which the biocompatible crosslinked polymers are formed from water soluble precursors having electrophilic and nucleophilic functional groups capable of reacting and crosslinking in situ. Methods for making the resulting biocompatible crosslinked polymers biodegradable, or not, are provided, as are methods for controlling the rate of degradation. The crosslinking reactions may be carried out in situ on organs or tissues or outside the body. In embodiments, the biocompatible crosslinked polymers and/or their precursors may be utilized in a surgical procedure, such as a polypectomy.