An in situ gel-forming composition is disclosed. The in situ gel-forming composition comprises one or more absorbable polymers, solvents such as N-methyl-2-pyrrolidone, polyethylene glycol or DMSO, and optionally one or more bioactive agent. The composition forms a hydrogel or semi-solid mass on contact with an aqueous environment. The method of using in situ gel-forming composition for various applications is also disclosed.