Using includes with ASP.NET

J

Jay

I have a situation where using includes in an ASP.NET page does what I need. I know that someone understandably is going to say why don't you use UserControls. There are two reason. UserControls do not have any design time support and the logic of what I am trying to do lends itself nicely to includes. Master Pages will provide the design time support I need when they are available.

I am using a statement like the following:

<!-- #include virtual="/MCL/Template/Foo.inc"-->

MCL is the name of my virtual directory.

Here is the problem: This works fine for both asp and aspx pages on my servers, but when I publish my site to another server in my company the include only works with asp pages, not with aspx pages. For my local servers I am using both IIS 5.0 and 6.0. For the server where the include does not work IIS 5.0 is being used. The server in question unfortunately is not local.

Suggestions of what to look at?

Jay
 
S

Si

Are u giving the same path in the server also ? If so have
u created the folders were it is looking for the
file "foo.Inc."

If so make sure u have permissions to that folder.

hope this helps.
Si
-----Original Message-----
I have a situation where using includes in an ASP.NET
page does what I need. I know that someone understandably
is going to say why don't you use UserControls. There are
two reason. UserControls do not have any design time
support and the logic of what I am trying to do lends
itself nicely to includes. Master Pages will provide the
design time support I need when they are available.
I am using a statement like the following:

<!-- #include virtual="/MCL/Template/Foo.inc"-->

MCL is the name of my virtual directory.

Here is the problem: This works fine for both asp and
aspx pages on my servers, but when I publish my site to
another server in my company the include only works with
asp pages, not with aspx pages. For my local servers I am
using both IIS 5.0 and 6.0. For the server where the
include does not work IIS 5.0 is being used. The server
in question unfortunately is not local.
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top