5,699,997 members and growing! (25,338 online)
Email Password   helpLost your password?
Web Development » ASP » General     Intermediate

Fake Frames

By xicoloko

An article about faking frames to have pages with the same layout by using server side includes
Windows, IIS, Visual Studio, ASP, Dev

Posted: 20 Jul 2000
Updated: 20 Jul 2000
Views: 71,056
Bookmarked: 24 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
27 votes for this Article.
Popularity: 5.04 Rating: 3.52 out of 5
0 votes, 0.0%
1
0 votes, 0.0%
2
0 votes, 0.0%
3
1 vote, 25.0%
4
3 votes, 75.0%
5

Introduction

So you want to have a page that has a menu in the left, your banner in the top and the copyright and contact info below. I call this the classic layout.

Usually you use frames to accomplish this wish. But if you don't want to use frames, you would have to copy the almost static parts of each section of the page to each page in your site. That's ok.

But if you have to update the menu or the contact email, you would have to change a lot of pages, which is a kind of boring :-/, and it would cost you a good amount of time.

The solution I have is to use server side includes for those parts that are static (menu, copyright info, banner, ...). With the use of tables you'll have a framework for your pages.

So to update one of this static items you change the include file and all the pages will be ok.

The example will have this look:

These are the include files:

  • left.asp : for the left menu
  • top.asp : for the banner image
  • bottom.asp: for the contact and copyright stuff

Using server side includes in ASP is easy: just create a page you wish to include (your menu, top banner, bottom copyright etc) and then in your main page add the declaration:

<!-- #include virtual="include_file.asp" -->

where include_file.asp is the file you wish to include. "#include virtual=" means the page's path is specified relative to the web root. You can also use "#include file=" which means the path is specified as relative to the current page's directory.

More information about include files can be found typing "#include" on the index page of MSDN.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

xicoloko


XicoLoko is a brazilian developer based in Switzerland.

Occupation: Architect
Company: VisionOne AG
Location: Switzerland Switzerland

Other popular ASP articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 11 of 11 (Total in Forum: 11) (Refresh)FirstPrevNext
GeneralFrames and IISsussGabyO13:04 5 Nov '04  
GeneralUsing a variation on this can be a real improvement!memberMike Whitenton17:19 2 Jul '01  
GeneralRe: Using a variation on this can be a real improvement!memberCaio Proiete11:47 12 Jun '03  
GeneralRe: Using a variation on this can be a real improvement!memberMike Whitenton13:02 12 Jun '03  
GeneralRe: Using a variation on this can be a real improvement!memberCaio Proiete16:46 12 Jun '03  
GeneralRe: Using a variation on this can be a real improvement!memberMike Whitenton13:22 12 Jun '03  
GeneralRe: Using a variation on this can be a real improvement!memberCaio Proiete16:49 12 Jun '03  
Generalinclude file altmemberAnonymous3:33 30 Jan '01  
GeneralASP or IIS thing?sussTerry Mulvany18:59 2 Nov '00  
GeneralRe: ASP or IIS thing?sussUwe Keim20:15 2 Nov '00  
GeneralI've always called this "Server-Side Framing"sussUwe Keim21:08 21 Jul '00  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 20 Jul 2000
Editor: Nishant Sivakumar
Copyright 2000 by xicoloko
Everything else Copyright © CodeProject, 1999-2008
Web16 | Advertise on the Code Project