Using ASP.NET with C#, I would like to load the content of another page into my current page.
I have a main div id="maindiv" on one page with a header above it. The header contains clickable links that route to the same url with a get variable like http://www.mainpage.com&page=nextpage. I would like to use the page get variable in a switch case to load from a specified page into maindiv. I can do the switch case bit fine, but how do I load the response from another page?
It sounds like you want to keep the same layout (header, navigation, footer, etc) for all of your pages. ASP.NET 2.0 introduced Master Pages, which are basically layout files that allow you to create Content pages that fill in place holders in the layout.
Here’s a sample from the MSDN article.
Master Page:
Content page: