Freezing fresh corn is the best way to hold on to the flavor. Corn loses its freshness within a day or two. Take off the husks and stringy stuff and place into Ziploc. Push out air and freeze. You can cut the corn into smaller portions before freezing to.
Buying fresh produce and freezing it yourself insures the quality, ripe, freshness you like best.