» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > ASP forums and Tips

ASP forums and Tips Talk about ASP Scripting. .net and Cold Fusion as well.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2006, 02:44 PM
bamby bamby is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
bamby is on a distinguished road
Default Header for ASP

Hi guys

Here's my situation. I'm creating a bunch of ASP pages and want a commom header to be included in all. In this header, I want the name of the page included. This is the cheap way that I'm currently doing it:

<!--#include file="headstart.htm"-->
Page Title
<!--#include file="headend.htm"-->

where headstart.htm is basically:

<table border=0 width=600 align="center">
**<tr>
****<td width=20%>
******<img src="blah.jpg"></img>
****</td>
****<td width=80% align="center">
******Site Name<br>

and headend.htm is basically:

****</td>
**</tr>
</table>

What is the cleanest way to call a header that will be passed the title of the page and have it inserted?

Please let me know if -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-29-2006, 02:45 PM
bizzare bizzare is offline
OSP Starters
 
Join Date: Jun 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
bizzare is on a distinguished road
Default

Why not write a function? Or two for that matter?

PHP Code:
<%
' Of course your headers can be a little more detailed.
Function makeHeader(title)
response.write "<html><head><title>" & title & "</title></head><body>"
end function

function makefooter()
response.write "</body></html>"
End function
%>
' Now on all your pages
<% makeHeader "Page Title " %>

Content
....
....
....
end content

<% makefooter() %> -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
email from header SLANG PHP Programming and Tips 1 08-17-2006 02:59 PM
Can one have PHP4 parse .htm/.html and keep the Last-Modified header teaser PHP Programming and Tips 1 06-30-2006 12:56 PM


All times are GMT. The time now is 02:06 AM.