I would do it serverside and without javascript. Here is a asp solution in
vb it souldn't be to hard to convert this to C#. Also don't use iframes when you don't need them this example is without iframes but with layers.
Css file to create your layout without Iframes
Code:
/* CSS Document */
body{
text-align:center;
background-color:#CCCCCC;
}
#container{
background-color:green;
position: relative;
margin: 0 auto;
width: 780px;
text-align:left;
/*Firefox/IE fix*/
margin-top:-21px !important;
margin-top:-15px;
}
#banner{
height:80px;
width:780px;
background-color:navy;
clear:left;
}
#navigation{
float:left;
width:170px;
height:500px;
background-color:green;
margin-bottom:0px;
padding-bottom:0px;
padding-left:5px;
padding-top:10px;
font-size:16px;
}
#content{
background-color:white;
height:500px;
width:600px !important;
width:610px;
float:left;
padding-left:5px;
padding-top:10px;
margin-bottom:0px;
padding-bottom:0px;
margin-top:0px;
}
#footer{
clear:left;
height:50px;
width:780px;
background-color:yellow;
margin-top:-22px !important;
margin-top:-19px;
}
the asp file this you can convert to aspx I used a case to select a external file if your websites becomes to big you should use a database. The include is selected with the variable in the url id
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="layout.css" />
</head>
<body>
<div id="container">
<div id="banner">
<h1>Header</h1>
</div>
<div id="navigation">
<a href="index.asp">home</a><br />
<a href="index.asp?id=1">links</a><br />
<a href="index.asp?id=2">etc</a><br />
<a href="index.asp?id=3">etc</a><br />
</div>
<div id="content">
<%
select case Request.QueryString("id")
case 1
%><%
case 2
%><%
case 3
%><%
case Else'Default falue
%><%
end select
%>
</div>
<div id="footer"><h1>Footer</h1></div>
</div>
</body>
</html>
You only need to create your include files this something like this:
default.inc
Code:
<p>Default page</p>
__________________________________________________ ________
This is my junk I'm gona eat it