Prepare a grill or turn the broiler to high; put the rack four inches from the heat.
Husk the corn. If broiling put it on a rimmed baking sheet. Halve the lime.
Grill or broil the corn, turning as necessary, until all the sides are charred in places, 5 to 8 minutes total. Squeeze the lime juice into a small bowl and add 2 tablespoons mayonnaise, 1/4 teaspoon chile powder, and a sprinkle of salt and pepper. Stir to combine, taste, and adjust the seasoning, adding more chile powder if you like.
When the corn is done, remove it from the grill or broiler and spread each ear all over with some of the mayonnaise mixture. Serve hot.