473,323 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

how does #Include work?

Hi,

In an asp.net application, I have seen some lines like this:

<!-- #Include File="xyz.html" -->

and I can see what happens when the included file contains just text and
html, but I can't find any documentation on msdn about this and I'm trying
to find out how it is processed. Specifically:

1. is the #include processed by the browser, by asp.net, or by IIS?
2. at what point in the page lifecycle is it processed?
3. where is the documentation for it?

TIA for any clues.

Andy
Nov 19 '05 #1
3 1157
It's a throwback to the ASP days and really not that handy. A control will do
you better. Anyway, INCLUDES are pulled into the page PRIOR to ANY parsing,
so they cant use any variables, etc.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"Andy Fish" wrote:
Hi,

In an asp.net application, I have seen some lines like this:

<!-- #Include File="xyz.html" -->

and I can see what happens when the included file contains just text and
html, but I can't find any documentation on msdn about this and I'm trying
to find out how it is processed. Specifically:

1. is the #include processed by the browser, by asp.net, or by IIS?
2. at what point in the page lifecycle is it processed?
3. where is the documentation for it?

TIA for any clues.

Andy

Nov 19 '05 #2
See :
http://msdn.microsoft.com/library/de...tiveSyntax.asp

This is server side and processed very early (AFAIK even before creating the
page as its "text" must be known before).

Under .NET this is likely there for legacy. Depending upon what you are
doing, you could use for example "user controls" instead...

--
Patrice

"Andy Fish" <aj****@blueyonder.co.uk> a écrit dans le message de
news:%2********************@TK2MSFTNGP09.phx.gbl.. .
Hi,

In an asp.net application, I have seen some lines like this:

<!-- #Include File="xyz.html" -->

and I can see what happens when the included file contains just text and
html, but I can't find any documentation on msdn about this and I'm trying
to find out how it is processed. Specifically:

1. is the #include processed by the browser, by asp.net, or by IIS?
2. at what point in the page lifecycle is it processed?
3. where is the documentation for it?

TIA for any clues.

Andy

Nov 19 '05 #3
Thanks for these replies, especially the MSDN link (I was only looking at
asp.net directives so I missed it)

I wanted to have the asp.net logic decide which file to include so obviously
this is no good for my purposes. I'll dynamically load a web user control
instead.

Andy

"Patrice" <no****@nowhere.com> wrote in message
news:OO*************@tk2msftngp13.phx.gbl...
See :
http://msdn.microsoft.com/library/de...tiveSyntax.asp

This is server side and processed very early (AFAIK even before creating
the
page as its "text" must be known before).

Under .NET this is likely there for legacy. Depending upon what you are
doing, you could use for example "user controls" instead...

--
Patrice

"Andy Fish" <aj****@blueyonder.co.uk> a écrit dans le message de
news:%2********************@TK2MSFTNGP09.phx.gbl.. .
Hi,

In an asp.net application, I have seen some lines like this:

<!-- #Include File="xyz.html" -->

and I can see what happens when the included file contains just text and
html, but I can't find any documentation on msdn about this and I'm
trying
to find out how it is processed. Specifically:

1. is the #include processed by the browser, by asp.net, or by IIS?
2. at what point in the page lifecycle is it processed?
3. where is the documentation for it?

TIA for any clues.

Andy


Nov 19 '05 #4

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

Similar topics

7
by: Niels Sloth | last post by:
Hi I have 9 asp-sites on a Win2003 server, and would like to use the same include file, but it does not work. The path for the servers default website (which is not where the problem is) is...
3
by: Zenobia | last post by:
I copy an application to wwwroot: wwwroot +--- myApp +--- common | +--- images | default.asp global.asa
22
by: Robert Bralic | last post by:
CAN anybody tell me any address where I can download some small(1000-2000) lines C++ proghram source. Or send me ,a small(1000-2000) lines C++ program source that I can compille with gpp under...
1
by: CAH | last post by:
Hi Why does this not work? if (!$artnr) { include "./smalltable.php"; } else { include "./bigtable.php"; }
1
by: Stephen Edgecombe | last post by:
Hi Environment: Visual Studio .NET 2003 (vb) I am developing an XSD Schema and want to include some building blocks from another source, so they have a different namespace. - If I use an...
5
by: Stephen Mayes | last post by:
#include <stdio.h> #include <stdlib.h> #include <string.h> int main (void) { static char * contents = "Line1\nLine2\nLine3\nLine4"; FILE * tmp; char readbuf; size_t len, n = 0;
1
by: Alex VanderWoude | last post by:
I am trying to <include> some text into an XML documentation topic, but that text is stored in a file that is in a different directory than the "current" XML file. Using a relative path does not...
1
by: AD | last post by:
Hi I am trying to read elements of a vector from console (cin) in two steps ie, read a list of numbers from cin. Sort these. Then read from cin again and append in same vector. ...
17
by: christophe.chazeau | last post by:
Hi, I have a problem with a really simple chunk of code which should work but does obviously does not. This chunk of code is just a POC aimed at finding a bug in a larger project in which the...
2
by: year1943 | last post by:
There was the same topic not so long ago, but as I see it stays w/o answer:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.