I have a page which, according to the boss's instructions, needs to show one
of two things, based on which radio button was chosen on the previous page.
Because these 'things' are actually some chunks of code which contain sql
queries, loops, etc., I think it might be best to put each of them into an
include.
Will this work:
<%If strReports = "Detailed" then%>
<!-- #INCLUDE FILE="builddeta iledreport.asp" -->
<%Else%>
<!-- #INCLUDE FILE="buildsumm ary.asp" -->
<%End if%>
Or would it be better to do a response.write?
<%If strReports = "Detailed" then
Response.write "<!-- #INCLUDE FILE='builddeta iledreport.asp'--> "
Else
Response.write "<!-- #INCLUDE FILE='buildsumm ary.asp' --> "
End if%> 3 3595
"middletree " <mi********@hto mail.com> wrote in message
news:%2******** *******@TK2MSFT NGP11.phx.gbl.. . I have a page which, according to the boss's instructions, needs to show
one of two things, based on which radio button was chosen on the previous
page. Because these 'things' are actually some chunks of code which contain sql queries, loops, etc., I think it might be best to put each of them into an include.
Will this work:
<%If strReports = "Detailed" then%> <!-- #INCLUDE FILE="builddeta iledreport.asp" --> <%Else%> <!-- #INCLUDE FILE="buildsumm ary.asp" --> <%End if%>
This will work. Both files will be included, but only the code in the one
that is in the true condition will be executed.
Example:
include1.asp:
<% Response.Write "I'm included." %>
include2.asp:
<% Response.Write "I'm included, but not executed." %>
page.asp:
<% If 1 = 1 Then %>
<!-- #include file="include1. asp" -->
<% Else %>
<!-- #include file="include2. asp" -->
<% End If %>
That would be the same as:
<% If 1 = 1 Then %>
<% Response.Write "I'm included." %>
<% Else %>
<% Response.Write "I'm inlcluded, but not executed." %>
<% End If %>
Or would it be better to do a response.write? <%If strReports = "Detailed" then Response.write "<!-- #INCLUDE FILE='builddeta iledreport.asp'--> " Else Response.write "<!-- #INCLUDE FILE='buildsumm ary.asp' --> " End if%>
This will not work. All that would do is create a comment in your html
output. Include directives aren't part of the response, and they are
processed before any asp is.
Ray at work
"middletree " <mi********@hto mail.com> wrote in message
news:%2******** *******@TK2MSFT NGP11.phx.gbl.. . I have a page which, according to the boss's instructions, needs to
show one of two things, based on which radio button was chosen on the previous
page. Because these 'things' are actually some chunks of code which contain
sql queries, loops, etc., I think it might be best to put each of them
into an include.
Will this work:
<%If strReports = "Detailed" then%> <!-- #INCLUDE FILE="builddeta iledreport.asp" --> <%Else%> <!-- #INCLUDE FILE="buildsumm ary.asp" --> <%End if%>
Or would it be better to do a response.write?
<%If strReports = "Detailed" then Response.write "<!-- #INCLUDE FILE='builddeta iledreport.asp'--> " Else Response.write "<!-- #INCLUDE FILE='buildsumm ary.asp' --> " End if%>
I would go with the first one since the second one simply prints out the
include directive. ;-p
-Chris Hohmann www.aspfaq.com/2042
"middletree " <mi********@hto mail.com> wrote in message
news:#x******** *****@TK2MSFTNG P11.phx.gbl... I have a page which, according to the boss's instructions, needs to show
one of two things, based on which radio button was chosen on the previous
page. Because these 'things' are actually some chunks of code which contain sql queries, loops, etc., I think it might be best to put each of them into an include.
Will this work:
<%If strReports = "Detailed" then%> <!-- #INCLUDE FILE="builddeta iledreport.asp" --> <%Else%> <!-- #INCLUDE FILE="buildsumm ary.asp" --> <%End if%>
Or would it be better to do a response.write?
<%If strReports = "Detailed" then Response.write "<!-- #INCLUDE FILE='builddeta iledreport.asp'--> " Else Response.write "<!-- #INCLUDE FILE='buildsumm ary.asp' --> " End if%>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jean de Largentaye |
last post by:
Hi,
I need to parse a subset of C (a header file), and generate some unit
tests for the functions listed in it. I thus need to parse the code,
then rewrite function calls with wrong parameters. What I call "shaking
the broken tree" :)
I chose to make my UT-generator in Python 2.4. However, I am now
encountering problems in choosing the right parser for the job. I
struggle in choosing between the inappropriate, the out-of-date, the...
|
by: nospam |
last post by:
DEAR MICROSOFT:
WOULD YOU PLEASE put up a web page showing the price list of EXPECTED COSTS
for MOM & POP when choosing between MySql/PHP and .NET.
FIRST:
Show INITIAL COSTS for like a 5-10 page web site that can take a few
orders...
INCLUDE THE ISP charges..developer, software...
|
by: RJ |
last post by:
I have developed numerous WinForm based utilities in .NET, but I wanted to
consider a WebForm UI for my next utility, which runs only inside a
corporate intranet. I have done only minimal development with ASP.NET and
could use some advice. The primary logic consists of copying and moving
files both on the local computer, and servers across the enterprise. Is
ASP.NET a good choice where a lot of file access and file IO is involved?
Are...
|
by: David Sanders |
last post by:
Hi,
As part of a simulation program, I have several different model
classes, ModelAA, ModelBB, etc., which are all derived from the class
BasicModel by inheritance.
model to use, for example if the parameter model_name is "aa", then
choose ModelAA.
Currently I do this as follows:
|
by: hansBKK |
last post by:
Upfront disclaimer - I am a relative newbie, just starting out learning
about PHP, mostly by researching, installing and playing with different
scripts. I am looking for a host that will provide the right environment
for this - running a wide variety of PHP applications. I realise that
security is also important, but for now flexibility is more important to
me.
Note that I'm **not** looking for people to recommend hosting companies,
I...
| |
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |