473,471 Members | 2,613 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Conditionally including a file

Is there a way to conditionally include a file in the HTML?

<TD>
if x= 1 then
<!--#INCLUDE FILE="../File1"-->
else
<!--#INCLUDE FILE="../File2"-->
end if
</TD>
Nov 19 '05 #1
2 1231
ASP.NET doesn't use include files.

If you want to include either HTML or functions, then use user controls,
compiled assemblies or, in 2.0, source files in the App_Code directory.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Craig" <No****@hotmail.com> wrote in message
news:Ow**************@TK2MSFTNGP11.phx.gbl...
Is there a way to conditionally include a file in the HTML?

<TD>
if x= 1 then
<!--#INCLUDE FILE="../File1"-->
else
<!--#INCLUDE FILE="../File2"-->
end if
</TD>

Nov 19 '05 #2
It is not for including asp.net code but for including Fireworks Pop-Up menu
code.
Thanks, anyway I got it working to include menu code based on the users
login.

"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
ASP.NET doesn't use include files.

If you want to include either HTML or functions, then use user controls,
compiled assemblies or, in 2.0, source files in the App_Code directory.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Craig" <No****@hotmail.com> wrote in message
news:Ow**************@TK2MSFTNGP11.phx.gbl...
Is there a way to conditionally include a file in the HTML?

<TD>
if x= 1 then
<!--#INCLUDE FILE="../File1"-->
else
<!--#INCLUDE FILE="../File2"-->
end if
</TD>


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sten Westerback | last post by:
Hi I'm considering using .asp to implement a selective inclusion of .htm files containing tables into a HTML code sent to browser from IIS. My question is if it is possible to make an .asp...
8
by: Yaro | last post by:
Hello Could anyone tell how can I drop table conditionally (UDB 8.2 Win) ? I have a script file create table_1@ create table_2@ etc.... I need add to this script statement like that
10
by: SueB | last post by:
I currently have a 'mail-merge' process in my Access db project. It generates custom filled out Award Certificates based on an SQL SELECT statement in a VBA routine invoked by clicking on a...
2
by: Olav Tollefsen | last post by:
I'm creating an ASP.NET e-commerce web site and I have to conditionally (depending on site / user settings) display prices either excluding or including tax. Prices are typically read from a...
2
by: Jens Weiermann | last post by:
Hi, I need to conditionally disable a html (not web forms) button control. The condition is to be evaluated server-side. What is the smartest way to do this? I'm now using a literal server-side...
4
by: John | last post by:
I need to read data from the file like the following with name and score, but some line may only has name without score: joe 100 amy 80 may Here's my code, but it couldn't read the line with...
2
by: Felix | last post by:
Hello, I use a #define like WITH_MYSTUFF to conditionally compile code within #ifdef WITH_MYSTUFF. I would now like the same define to conditionally link with a library. In the linker settings...
7
by: lister | last post by:
Hi, I have a situation where I have a large block of HTML code that is conditionally displayed. In effect I have: html page some html <?php if (bShowBlock)
2
by: dohko8 | last post by:
Hi I would like to know how to load .js files conditionally? Suppose I have a Drop down box that is populated dynamically with A B C. When I select Element A I want it to load a .js file, B a...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.