Reputation: 2306
Hi just wondering if there is anyway that I could duplicate controls in a asp.net pages.
So for example, currently for one of my pages, I have a panel at the top of the page with alot of controls in them ( eg next/previous buttons, labels, trees, etc).
However I wanted to add the exact duplicate of this panel on the bottom of the page aswell, with exact functionality.
Is there a easy way to do this, or do I need to do it manually...
Thanks
Upvotes: 0
Views: 148
Reputation: 630587
What you're after is either UserControls or Master Pages, or a combination of both.
Upvotes: 0
Reputation: 25704
One option is to place all the controls inside a UserControl. Then include the UserControl once at the top and once at the bottom.
If you do this then wiring up all events might be more difficult, though.
Upvotes: 2