Do you mean "in a vivarium?" I'm not sure what you mean by "and a viv."
If you are asking, "Can I use a thermostate to control two DIFFERENT types of heat sources at one time?" then the answer is likely no....UNLESS the probe is in the cage and set to turn off both heat sources whenever that spot in the cage gets over a certain temp. I would NEVER risk using one to control temps in different cages with different types of heating elements. Period.
....and make sure the sources together don't suck more wattage than the thermostat is rated to to run. If you are using an el cheapo, this can be a real concern. If you are using a good one (as you should), then it is likely rated for 500 or more watts...and can handle 2 of the standard heat sources used by most people easily.....as long as you set it to shut off BOTH of them when the spot they warm TOGETHER hits a certain temp.
KJ