kmose 0 Newbie Poster

Currently, I have a Table that is written in aspx markup right in the aspx page (<asp:Table ..). Then I have C# code for the page itself. In that C# code I am doing things like adding rows to the table in the Page_Load method, based on button clicks. Logically, the table and any associated labels, buttons, etc are one unit, and someone should be able to easily migrate them to another page altogether, so I think the way I am doing it is not the most maintainable. What can I do to make it more maintainable? Should I make a class containing the Table and its associated labels, buttons, etc? If so, would I move code that is currently in Page_Load to the Table's OnLoad method and override that method? For the Page, I know that doing Page_Load basically results in my Page_Load method getting called after the Page's own Load method. How can I do something similar for my own class (I don't know what the technique is called), or should I just override the Table's OnLoad method and call base.OnLoad there?

Thanks. Any hints, examples, or even terms that I can go google are appreciated.