?
Solved

Create Header & Footer for Master Page

Posted on 2007-10-08
3
Medium Priority
?
2,972 Views
Last Modified: 2008-01-09
I would like to add a header and footer to a Master Page (my first attempt).

What is the best way to do thgis? Add a DIV for each of Hedaer and Footer and name them accordingly?
0
Comment
Question by:allanmark
  • 2
3 Comments
 
LVL 16

Expert Comment

by:McExp
ID: 20036515
Assuming you need to overide the content of the Header and fotter, You would use Content Place Holders to alow you to overide the data.

<asp:ContentPlaceHolder ID="cphHeader" runat="server" >Default Header Content<asp:ContentPlaceHolder/>

With regards to how to structure the site you could use Tables, Divs or CSS layers whatever you are most comfortable with.
0
 

Author Comment

by:allanmark
ID: 20036952
Thanks !!!!

One last question .....

How does once make sure that your footer is always at the bottom of the screen, if the page is "short" (ie only has a few lines?
0
 
LVL 16

Accepted Solution

by:
McExp earned 450 total points
ID: 20037270
Now that is a more complicated question, The only way I've succedded to do this in the past is to use Tables and set the height. E.g.

<table height="100%">
<tr height="5%">
<td>
<!-- Header Cell -->
</td>
</tr>
<tr height="90%">
<td>
<!-- Body Cell -->
</td>
</tr>
<tr height="5%">
<td>
<!-- Footer Cell -->
</td>
</tr>
</table>

Purists will tell you that this is bad and Web pages are designed to be as long as they need to be not full screen etc. you will also have problems with this approach if you have the Transitional DocType statment in your Master Page.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question