The present invention provides a method for preparing chitosan solutions to allow regulating the conditions in which the chitosan solution will gel. The present invention also provides methods for using chitosan solutions as compositions and for using chitosan solutions in vitro and in vivo.