I have an ASP site with about 50 ASP files, all of which are currently
including a common "includes.asp" file near the top of the file, responsible
for generating the <HEAD/> section of the HTML
I need to make a change for 3 of those ASP files such that some dynamic HTML
is generated in the <HEAD/> section. I want those dynamic HTML to appear
only for 3 specific ASP files. Is there a more elegant way other than to
1) Dim strOptionalDymanmicHtml1 in includes.asp
2) Initialise strOptionalDymanmicHtml1 to "" in includes.asp
3) In the 3 ASP files which require additional optional dynamic HTML,
initiliase strOptionalDymanmicHtml1 *before* including includes.asp
There is an additional even more tricky problem, I have most file taking
this structure
ASPbeingView.asp including
- config.asp
- includes.asp
config.asp initialise a variable that is displayed in include.asp
However, there is one particular ASP file whose variable need to be
initialised in a different manner (within the ASPbeingView.asp). How could
I achieve this?
I have tried
1) Dim strDefault in config.asp
2) Initialise strDefault in config.asp
3) Dim strTemp in includes.asp
4) strTemp= strDefault in includes.asp
5) in the special ASP which need a different initialisation, I tried:
5.1) strTemp= "some other value",
but this doesn't work
Any thing other than making another copy of includes.asp and getting this
special ASP file to include this seperate includes.asp (which would make
includes.asp not very manageable- i would have to change includes.asp and
includesSpecial.asp for any future changes)! 4 1615
Parse request.servervariables("script_name") ... this will have the
including file, not the included file. Then you can just do a conditional
based on that.
--
Aaron Bertrand
SQL Server MVP http://www.aspfaq.com/
"Patrick" <pa**@reply.newsgroup.msn.com> wrote in message
news:#e**************@tk2msftngp13.phx.gbl... I have an ASP site with about 50 ASP files, all of which are currently including a common "includes.asp" file near the top of the file,
responsible for generating the <HEAD/> section of the HTML
I need to make a change for 3 of those ASP files such that some dynamic
HTML is generated in the <HEAD/> section. I want those dynamic HTML to appear only for 3 specific ASP files. Is there a more elegant way other than to 1) Dim strOptionalDymanmicHtml1 in includes.asp 2) Initialise strOptionalDymanmicHtml1 to "" in includes.asp 3) In the 3 ASP files which require additional optional dynamic HTML, initiliase strOptionalDymanmicHtml1 *before* including includes.asp
There is an additional even more tricky problem, I have most file taking this structure ASPbeingView.asp including - config.asp - includes.asp
config.asp initialise a variable that is displayed in include.asp
However, there is one particular ASP file whose variable need to be initialised in a different manner (within the ASPbeingView.asp). How
could I achieve this?
I have tried
1) Dim strDefault in config.asp 2) Initialise strDefault in config.asp 3) Dim strTemp in includes.asp 4) strTemp= strDefault in includes.asp 5) in the special ASP which need a different initialisation, I tried: 5.1) strTemp= "some other value",
but this doesn't work
Any thing other than making another copy of includes.asp and getting this special ASP file to include this seperate includes.asp (which would make includes.asp not very manageable- i would have to change includes.asp and includesSpecial.asp for any future changes)!
Sorry, but not too sure what you mean by this, could you exemplify?
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uP**************@tk2msftngp13.phx.gbl... Parse request.servervariables("script_name") ... this will have the including file, not the included file. Then you can just do a conditional based on that.
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/
"Patrick" <pa**@reply.newsgroup.msn.com> wrote in message news:#e**************@tk2msftngp13.phx.gbl... I have an ASP site with about 50 ASP files, all of which are currently including a common "includes.asp" file near the top of the file, responsible for generating the <HEAD/> section of the HTML
I need to make a change for 3 of those ASP files such that some dynamic HTML is generated in the <HEAD/> section. I want those dynamic HTML to
appear only for 3 specific ASP files. Is there a more elegant way other than
to 1) Dim strOptionalDymanmicHtml1 in includes.asp 2) Initialise strOptionalDymanmicHtml1 to "" in includes.asp 3) In the 3 ASP files which require additional optional dynamic HTML, initiliase strOptionalDymanmicHtml1 *before* including includes.asp
There is an additional even more tricky problem, I have most file taking this structure ASPbeingView.asp including - config.asp - includes.asp
config.asp initialise a variable that is displayed in include.asp
However, there is one particular ASP file whose variable need to be initialised in a different manner (within the ASPbeingView.asp). How could I achieve this?
I have tried
1) Dim strDefault in config.asp 2) Initialise strDefault in config.asp 3) Dim strTemp in includes.asp 4) strTemp= strDefault in includes.asp 5) in the special ASP which need a different initialisation, I tried: 5.1) strTemp= "some other value",
but this doesn't work
Any thing other than making another copy of includes.asp and getting
this special ASP file to include this seperate includes.asp (which would make includes.asp not very manageable- i would have to change includes.asp
and includesSpecial.asp for any future changes)!
Hi Patrick,
How about a session variant? You may set the session variant at the very
beginning of ASPbeingView.asp. And then, include includes.asp. In
includes.asp, you can control the output based on the session variant. Can
this help?
Luke
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
You said you want includes.asp to be able to do something different when it
is in 2 or 3 ASP scripts, right?
So, in includes.asp:
<%
thispage = lcase(request.serverVariables("SCRIPT_NAME"))
if instr(thispage, "yourpage.asp")>0 then
' do something different
end if
%>
--
Aaron Bertrand
SQL Server MVP http://www.aspfaq.com/
"Patrick" <pa**@reply.newsgroup.msn.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl... Sorry, but not too sure what you mean by this, could you exemplify?
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message news:uP**************@tk2msftngp13.phx.gbl... Parse request.servervariables("script_name") ... this will have the including file, not the included file. Then you can just do a
conditional based on that.
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/
"Patrick" <pa**@reply.newsgroup.msn.com> wrote in message news:#e**************@tk2msftngp13.phx.gbl... I have an ASP site with about 50 ASP files, all of which are currently including a common "includes.asp" file near the top of the file, responsible for generating the <HEAD/> section of the HTML
I need to make a change for 3 of those ASP files such that some
dynamic HTML is generated in the <HEAD/> section. I want those dynamic HTML to appear only for 3 specific ASP files. Is there a more elegant way other than to 1) Dim strOptionalDymanmicHtml1 in includes.asp 2) Initialise strOptionalDymanmicHtml1 to "" in includes.asp 3) In the 3 ASP files which require additional optional dynamic HTML, initiliase strOptionalDymanmicHtml1 *before* including includes.asp
There is an additional even more tricky problem, I have most file
taking this structure ASPbeingView.asp including - config.asp - includes.asp
config.asp initialise a variable that is displayed in include.asp
However, there is one particular ASP file whose variable need to be initialised in a different manner (within the ASPbeingView.asp). How could I achieve this?
I have tried
1) Dim strDefault in config.asp 2) Initialise strDefault in config.asp 3) Dim strTemp in includes.asp 4) strTemp= strDefault in includes.asp 5) in the special ASP which need a different initialisation, I tried: 5.1) strTemp= "some other value",
but this doesn't work
Any thing other than making another copy of includes.asp and getting this special ASP file to include this seperate includes.asp (which would
make includes.asp not very manageable- i would have to change includes.asp and includesSpecial.asp for any future changes)!
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Nick |
last post by:
I have a bunch of includes that are includes of includes included
includicly... so they must be linked to the site root. Heres an
example...
...
|
by: Mike D |
last post by:
I have a .js menu file that runs in all of my intranet
files. I have an asp calendar system where I can add
calendar names to a db and it will display these new
calendars. What I don't have is a...
|
by: JR |
last post by:
Hi, I'm migrating my website to an IIS 6.0 server and all
the asp pages work fine except for the ones that reference
include files, even though I have "Enable parent paths"
enabled in the...
|
by: Sherry Littletree |
last post by:
Hi All
I am working on a site that has a large amount of common html on all its web
pages.
I am looking for a way to place this in a single file so, if changes are
made, I can change this...
|
by: Eric |
last post by:
Hello,
I have some server side includes on a Classic asp page that look
something like:
<!-- #include virtual="/includes/file1.asp"-->
<!-- #include virtual="/includes/file2.asp" -->
<!--...
|
by: Paul |
last post by:
On my development computer, I have virtual named host set up, like
www.site1.lab.
When I upload those to my web site for customer review under
mywebsite.com/clients/site1/
it throws some of the...
|
by: bartonc |
last post by:
You can find the original author of the script by ggling " Py2Exe version 6.3 setup" The cool thing about this is that it calls py2exe, just in case you're uncomfortable with the command line. I had...
|
by: Ben Sehara |
last post by:
Hi,
I want to include three php files in index.php file like the code below. But
it always shows up only two, any two of the three, any order.
<tr>
<td><?php include...
|
by: Steven Borrelli |
last post by:
Hello,
I am using the <?php include() ?statement on my website for
organizational purposes. However, one of my includes contains some
PHP code. Is there any way for the server to actually...
|
by: omerbutt |
last post by:
hi there i am trying to run the lightbox and a slider on a single page the light box is working allrigh but when i try to include the slider in the same page it generates error because i have to...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |