I have a piece of code which is used by several aspx.cs pages and I want to put that code in a separate page so that all these pages access that separate page.

I dont think i can use classes for this....

Why do you think you can't you classes, this is the way to share code among pages, websites or applications.

Maybe it's a good idea to put your code in a UserControl, you can also share them across other pages.

I have a piece of code which is used by several aspx.cs pages and I want to put that code in a separate page so that all these pages access that separate page.

I dont think i can use classes for this....

Its good idea to use Classes which is comman and shareable to all..
put ur class in App_Code folder, and classes which is created inside it will be sharable to whole applictaion.