I have an existing web application built using ASP.NET 4.0 and C#. The application has an Administration page, that contains many different sections in which you can change different settings. I've attached screenshots for clarity.
Currently everything is contained to one page. Which means I have a massive amount of controls on just one page. I would like to have a navigation panel where you could select the "section" you want and it would load a central content area with that "section". I'm wondering what would be the best way to do this. Would it be best to make each section it's own control, or would I separate each section into a separate page?
I want to make sure I go about it the right way so that it will be easy to maintain and scale.
I appreciate any help.

I would definitely recommend using controls for each piece. The nice thing about controls is that if you ever need to use them in a completely different part of your application you are good to go!
As for loading in separate controls you can simply use query string variables. For instance let's say you have an anchor tag like this:
<a href="/admin/index.aspx?admin=businessHours">Business Hours</a>
Now we can build a single page: /admin/index.aspx and on the page load we can check the query string. Now depending on that query string we can then load the appropriate control.
Reading from a query string: http://triaslama.wordpress.com/2008/04/12/retrieving-query-string-values-in-aspnet-and-javascript/
Loading User control via code behind: http://www.codeproject.com/Articles/1939/Programatically-include-an-ASP-NET-UserControl-in
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With