Let C⊂Pg−1 be a canonically embedded nonsingular nonhyperelliptic curve of genus g and let X⊂Pg−1 be a quadric containing C. Our main result states among other things that the Hilbert scheme of X is at [C⊂X] a local complete intersection of dimension g2−1, and is smooth when X is. It also includes the assertion that the minimal obstruction space for this deformation problem is in fact the full associated Ext1-group and that in particular the deformations of C in X are obstructed in case C meets the singular locus of X. As we will show in a forthcoming paper, this has applications of a topological nature.