What should I put in my head / foot -inc's (a

Results 1 to 3 of 3

Thread: What should I put in my head / foot -inc's (a

  1. #1
    Join Date
    Dec 1969

    Default What should I put in my head / foot -inc's (a

    I'm creating my first ASP-site and I would like some advice: I guess its a good idea to have head/foot include-files for the beginning/end of every document. What do you think these should contain? I guess open/closing the database, but what else is there that will be repeated on all pages (objects etc)? I would be very thankful for your comments! Also comments about non-ASP code I could put there (I can for example think of putting Stylesheet in the head).

  2. #2
    Join Date
    Dec 1969

    Default RE: What should I put in my head / foot -inc'

    Well...it all depends <BR><BR>You see I have an ASP web site. In each an every .asp page, I have a menu and in my menu I use a stylesheet. So I include my stylesheet in every .asp page where I have a menu. <BR><BR>The only obvious reason of using include files is to clear up some code. For instance, like you said if in most .asp page you have you need to connect to the database then an include file is one of your best approach, you could also you an application variable to store the connection string, but the easiest one is the include file.<BR><BR>And same thing for some html code, like for my menu, since my menu is in every .asp page and my menu uses only one stylesheet I have in each in every .asp page two include files.<BR><BR>One for my stylesheet and the other for my menu(which is a big &#060;table&#062;...&#060;/table&#062;.<BR><BR>So it all depends you see! I don&#039;t think include file increase performance because no matter what they are the first thing being processed by the .asp page but they make maintenance a lot more easy, and after all isn&#039;t that how we should all code are application and web site?<BR><BR>That&#039;s what I think

  3. #3
    James W. Guest

    Default RE: What should I put in my head / foot -inc'

    It really depends on your site. You could put most of the head and style in the header and closings in the footer. Here&#039;s a typical use:<BR>1 - header containing html doc type dec& style link <BR>2 - footer containing matching closing tags for #1<BR>3 - database open include<BR>4 - database close include<BR>5 - security include<BR>6 - no-cache headers include<BR><BR>Or combine them to suit your needs. Just remember not to call them xxx.inc but xxx.asp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts