Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Navigation Bars without Frames or Framesets

ASP.NET Forum General Use

Navigation Bars without Frames or Framesets

by  Lenvdb  Posted    (Edited  )
Do you find it hard to cope with Framesets and Frames? Do you need some structure in your ASP System? Do you need a way of doing easy,user friendly, but super navigation for your Web App?

I use this template for my apps. It uses a header, footer and sidenav bar to pages, similar to includes with header.inc, footer.inc pages.

It is Table Based and works well within ASP.net
Add a new folder to your project called navbars (traditionally it would be the includes folder)

The header, footer and sidenav pages are created inside this navbars folder. You may wish to create them as inc files, but for code I use aspx files. Its up to you.It is advisable to save them as inc files since the Intellisense keeps on modifying the code.

This is the codeblock for the Header.ASPX file

<body MS_POSITIONING="GridLayout">
<table width="100%">
<TR bgcolor="#ffffcc" width="100%">
<td valign="middle" align="center">
<Font face="Arial" size="4">This is a test Header file</Font>
</td>
</TR>
</table>

<table><tr>
<!--#INCLUDE FILE="sidenav.aspx"-->

This is the codeblock for the sidenav.ASPX file:

<TD width= 15% bgcolor=#cccc33 >
===
<UL>
<li>Go Up</li>
<li>Go Down</li>
<li>Go left</li>
<li>Go right</li>
</UL>
===
</TD>
Do all your links, buttons and images here

This is the codeblock for the footer.ASPX file:

</tr></table>
<table width=100%>
<TR bgcolor="#ffffcc" width="100%">
<td valign="middle" align="center">
<Font face="Arial" size="4">This is a test Footer file</Font>
</td>
</TR>
</table>
</body>
</HTML>

This is the template for all content pages:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="mypage.aspx.vb" Inherits="mysystem.mypage"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Testing Testing</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>

<!--#INCLUDE FILE="navbars/header.aspx"-->
<TD width= 85% bgcolor=#ffff33>
Type your ASP Code Here
</TD>
<!--#INCLUDE FILE="navbars/footer.aspx"-->


Well, that is pretty much the template. I trust you will find it useful.
Regards

Len
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top