A method comprising the steps of: (A) forming a fluid comprising a crosslinked polymer, wherein the crosslinked polymer comprises: (i) a first monomeric unit of one or more N-vinyl lactams; and (ii) a crosslinker selected from the group consisting of: divinyl ether, diallyl ether, vinyl or allyl ethers of polyglycols or polyols, divinylbenzene, 1,3-divinylimidazolidin-2-one, divinyltetrahydropyrimidin-2(1H)-one, dienes, allyl amines, N-vinyl-3(E)-ethylidene pyrrolidone, ethylidene bis(N-vinylpyrrolidone), and any combination of any of the foregoing; and (B) introducing the fluid into a portion of a well. The crosslinked polymer may additionally comprise: a second monomeric unit selected from the group consisting of: acrylamide, N-substituted acrylamides, methacrylamide, N-substituted methacrylamides, acrylates, methacrylates, acrylic acid, methacrylic acid, N-vinylamides, N-allyl amides, vinyl alcohol, vinyl ethers, vinyl esters, allyl alcohol, allyl ethers, allyl esters, vinylpyridine, vinyl sulfonates, allyl sulfonates, vinylimidazole, allylimidazole, diallyldimethylammonium chloride, and any combination of any of the foregoing.