 He pursued classical studies, and graduated from the College of Meadville.He studied law, was admitted to the bar in 1829 and commenced practice in Greensburg, Pennsylvania.Foster was elected as a Democrat to the Twenty-eighth and Twenty-ninth Congresses.