how does #Include work?

  • Thread starter Thread starter Andy Fish
  • Start date Start date
A

Andy Fish

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
 
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top