Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8744375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:49:52+00:00 2026-06-13T11:49:52+00:00

How can I include pages, style sheets, or links to them, automatically into my

  • 0

How can I include pages, style sheets, or links to them, automatically into my ASP VBscript pages? I read something about ‘global’ pages, but I am unsure what they mean and how it is that I can accomplish such a thing. I’m sure this is an easy question, but it’s of great help to me as I’ve been writing VBscript for 2 days now! I’m not exactly an expert on HTML in general either, but I feel I have a reasonably good grasp of things. I would appreciate a good detailed example of how a ‘global’ page plays with my other ASP pages.

I’m setting up my first site…a management site for the main site I intend to build afterward. I want to get all my ducks in a row before moving forward with the public site. Can someone please give me some detailed information on how to include these pages/links automatically (page includes(header/footer), style sheets, etc) globally throughout my site without the need of using <!--#include file.... on each page I make, because that is kind of a pain and I’m sure there is an easier way. If there is, I know you can help! Thanks in advance, I look forward to hearing what options/possibilities are available.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:49:53+00:00Added an answer on June 13, 2026 at 11:49 am

    If you insist on using ASP Classic you may find some method for handling masterpage like functionality but it is, to the best of my knowledge, not suppoerted as such by the framework.

    [Edit] Given the edit of the original question the method first demonstrated is not so interesting, hence I suggest an alternative method too.

    You could make a general ASP-page which serves all traffic to the site. A queryparameter then specifies which subpage should be displayed. Subpages are made as seperate ASP-pages which are executed by the general/master page or by another subpage. A very crude example of this could look like this:

    <%
    url = Request.QueryString("url") & ""
    if url = "/" or url = "" then
      subpage = "home.asp"
    else
      subpage = url & ".asp"
    end if
    %>
    <!DOCTYPE html>
    <html>
    <head>
      <title>Header for all pages</title>
      <link rel="stylesheet" href="/css/site.css" />
    </head>
    <body>
    
        <% Server.Execute(subpage) %>
    
    </body>
    </html>
    

    The site should then be addressed in this fashion:

    www.domain.com/default.asp?url=/contact 
    

    which would load the contact.asp subpage into the masterpage or:

    www.domain.com/default.asp?url=/user/1234/profile 
    

    to load a user’s profilepage (displayed by the profile.asp in the folder user/1234). This last example raises some issues because then every user has to have a folder containing all the asp-files (which is far from optimal) so you might want to employ some interpretation of the url queryparameter to redirect input in a more intelligent way.

    Another issue is the fact that subpages are ASP-pages themselves which means someone could reference them directly. This calls for some action to protect those subpages from direct reference. It can be done but this would probably mean including some code => back to square one!

    Another disadvantages of this approach is that subpages are rendered in their own context and hence can’t access functionality and data from the calling page’s context. This means that global data has to be shared in some other way (session, application, database or some other way). Data can’t be passed to the subpage either (and no, Server.Execute doesn’t allow query-parameters).

    The include-way

    Personally I think you get the most flexibility by using header/footer includes as demonstrated in my original post and shown below.

    One way is to put your general stuff in includes and then includes those bits on each ASP-page. E.g.:

    <!-- #include virtual="/includes/header.asp" -->
    
    content goes here
    
    <!-- #include virtual="/includes/footer.asp" -->
    

    And your header.asp could look something like this:

    <!DOCTYPE html>
    <html>
    <head>
      <title>Header for all pages</title>
      <link rel="stylesheet" href="/css/site.css" />
    </head>
    <body>
    

    and footer.asp like so:

    </body>
    </html>
    

    This strategy has some disadvantages. The header is fairly static which could present some problems with SEO; For one the title should fit the pagecontent which is hard to accomplish when the include contains the header-markup. This could be facilitated by some global variables that are set prior to the include-section i.e.:

    <%
    title = "Title for this page's content"
    %> 
    <!-- #include virtual="/includes/header.asp" -->
    
    content goes here
    
    <!-- #include virtual="/includes/footer.asp" -->
    

    and then in the header like so

    <!DOCTYPE html>
    <html>
    <head>
      <title><%=title%></title>
      <link rel="stylesheet" href="/css/site.css" />
    </head>
    <body>
    

    but that already begins to “smell” a little because you set up some expectations for the including page inside the include-file. At least you have to be very disciplined when constructing your pages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone suggest some best options to include charting feature in my ASP.NET pages
I have several textboxes where users can enter information into them. This can include
How can I include a servlet page , in a JSF page. Is there
I wonder how a can include an pre-compiled binary in an iPhone application. I
I would like to know if I can include some Jquery inside another JQuery
Here is what I have- How I can include multiple keys and their values
When connecting to a Sql Server you can include either App or Application Name
Consider and client server scenario and you got two options: You can include Server's
I am looking for a syntax highlighting component that I can include in a
I'm trying to do a bit of fancy/experimental php so that you can include

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.