You can cook ears of corn in the oven, either wrapped in foil or in the husks. If you want to bake them in the husks, soak them in a bucket of water for at least a half an hour, place them on a sheet pan, and then bake at 425°F (220°C) for 20 to 30 minutes. If you don't soak the corn, the kernels will dry out before the corn is cooked.

The wet-husk method, which many people use for grilling corn (outside the house), may be a little sloppy for inside your kitchen, so you might prefer the foil method instead.