You should use MVC here.