Container with heat or cold dispensing material comprising hydrogel with crosslinked hydrophilic polymer