Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Microsoft: ASP.NET FAQ

ASP.NET Forum General Use

Navigation Bars without Frames or Framesets by Lenvdb
Posted: 22 Dec 03 (Edited 8 Jan 04)

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>
    <!--#INCLUDE FILE="sidenav.aspx"-->

This is the codeblock for the sidenav.ASPX file:

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

This is the codeblock for the footer.ASPX file:

<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>

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">
    <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">;

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

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


Back to Microsoft: ASP.NET FAQ Index
Back to Microsoft: ASP.NET Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close