Re: ASP Includes on pages

by "Frank Boumphrey" <bckman(at)ix.netcom.com>

 Date:  Thu, 21 Jun 2001 20:06:18 -0400
 To:  "Rebecca Campbell" <Rebecca.Campbell(at)trustvesta.com>,
"'D Benfer'" <dmb(at)mokee.com>,
<hwg-techniques(at)hwg.org>
 References:  trustvesta
  todo: View Thread, Original
> I was under the impression that you couldn't actually do this, though.
> Because the parser will process the include first, then the ASP code. So
all
> includes on the page would be loaded before any ASP code was run? Haven't
> tried it yet, but something in the back of my mind tells me that is so.
Most
> likely you would have to go with a FileSystem Object and stream the code
in
> through that... HTH...

This was also my impression.

> i'm no ASP guru, but it works on my server...

I think you will find if you look at the source code that both includes are
there!

Frank

----- Original Message -----
From: "Rebecca Campbell" <Rebecca.Campbell(at)trustvesta.com>
To: "'D Benfer'" <dmb(at)mokee.com>; <hwg-techniques(at)hwg.org>
Sent: Thursday, June 21, 2001 2:42 PM
Subject: RE: ASP Includes on pages


> i'm no ASP guru, but it works on my server...
>
> you could use FSO to accomplish the same thing, but it seems much easier
to
> use if statements, as long as that works when tested.
>
> -rebecca
> http://www.nerdygirl.com
>
> -----Original Message-----
> From: D Benfer [mailto:dmb(at)mokee.com]
> Sent: Thursday, June 21, 2001 10:12 AM
> To: hwg-techniques(at)hwg.org
> Subject: RE: ASP Includes on pages
>
>
> I was under the impression that you couldn't actually do this, though.
> Because the parser will process the include first, then the ASP code. So
all
> includes on the page would be loaded before any ASP code was run? Haven't
> tried it yet, but something in the back of my mind tells me that is so.
Most
> likely you would have to go with a FileSystem Object and stream the code
in
> through that... HTH...
>
> Darren Benfer (dmb(at)mokee.com)
> Mokee Computer Technologies LLC
> www.mokee.com | 877-801-1343
>
> -----Original Message-----
> in that case, your urls for your page would probably end up looking
> something like this:
>
> http://www.yourdomain.com/main.asp?about
>
> in the main.asp file, you'd have something like this:
>
> <% If Request.querystring = "about" Then %>
>   <!-- #include file="about.html" -->
> <% End If %>
>
> You could also make it into a Select Case statement:
>
> <%
>   Dim q = Request.querystring
> Select Case q
>   Case "about"  %>
>     <!-- #include file="about.html" -->
>   <% Case "contact" %>
>     <!-- #include file="contact.html" -->
>   <% Case Else %>
>     <!-- #include file="main.html" -->
> <% End Select
> %>
>
> hth,
> rebecca
> http://www.nerdygirl.com
>
> -----Original Message-----
> From: David R. Longnecker [mailto:davidl(at)activematrixsolutions.com]
> Sent: Tuesday, June 19, 2001 7:01 AM
> To: 'Klaas De Waele'; 'Hwg-Techniques'
> Subject: RE: ASP Includes on pages
>
>
> Kayjey-
>
> I think you're onto what I'm trying to do, LOL.. but I'm not sure I
> understand how to do it.
>
> One person replied to change the table name from body since that's a
> defined name.. so change it to 'content'.  I have about.asp sitting over
> here with a table called 'about'.  I'd like to dynamically pull that
> table across when people choose the "About" button.
>
> Do you know of any web resources that I can check out?  I know it can be
> done, but I've got to find a definition in English. *grin*
>
> -David
>
> -----Original Message-----
> From: owner-hwg-techniques(at)hwg.org [mailto:owner-hwg-techniques(at)hwg.org]
> On Behalf Of Klaas De Waele
> Sent: Tuesday, June 19, 2001 4:16 AM
> To: 'davidl(at)activematrixsolutions.com'; 'Hwg-Techniques'
> Subject: RE: ASP Includes on pages
>
> What you need...
>
> URL: main.asp?REDIR=about.asp
>
> in main.asp
>
> response.redirect "Request.querystring("REDIR")"
>
> in about.asp
>
> include header
> page content
> include footer
>
> OR work with a database:
>
> in main.asp
>
> connect to database and get the content for about.asp, display it in the
> table
>
> OR work with external file:
>
> in main.asp include the source of a text or asp file, through Filesystem
> object
>
> My personal preference is either the first if you don't want a database;
> the
> second one if you also want easy control over the actual content through
> a
> GUI for example.  Though that's a whole other thing.
>
>
> - Kayjey -
>
>
>
>
> -----Oorspronkelijk bericht-----
> Van: owner-hwg-techniques(at)hwg.org
> [mailto:owner-hwg-techniques(at)hwg.org]Namens David R. Longnecker
> Verzonden: dinsdag 19 juni 2001 8:11
> Aan: Hwg-Techniques
> Onderwerp: ASP Includes on pages
>
>
> Hey everyone, how do you generate page content through a command in a
> link using ASP and SSI?
>
> Okay, I've built the basic layout of the page and called it main.asp and
> created a table called 'body' that I want everything to go in.  Now, I
> want to be able to call from the nav-bar like main.asp?about.asp or
> something to that effect to fill to the table called 'body'.
>
> Is anyone familiar with what I'm TRYING to figure out?  Any suggestions
> or references would be greatly appreciated!
>
> -David
>
> David R. Longnecker
> ActiveMatrix Solutions
> http://activematrixsolutions.com <http://activematrixsolutions.com/>
>
>

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.