Using includes with ASP.NET

Discussion in 'ASP .Net' started by Jay, Jan 13, 2004.

  1. Jay

    Jay Guest

    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
     
    Jay, Jan 13, 2004
    #1
    1. Advertising

  2. Jay

    Si Guest

    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.
    >
    >Suggestions of what to look at?
    >
    >Jay
    >
     
    Si, Jan 13, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Geraldine

    includes in ASP .NET

    Geraldine, Oct 28, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    318
    Kevin Spencer
    Oct 29, 2003
  2. Steve

    Virtual Includes in ASP.NET

    Steve, Nov 19, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    415
    Jim Cheshire [MSFT]
    Nov 19, 2003
  3. Davíð Þórisson

    migrating asp to aspl.net: includes?

    Davíð Þórisson, Dec 30, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    390
    Davíð Þórisson
    Dec 30, 2003
  4. =?Utf-8?B?RGFjdW5h?=

    ASP.NET and includes

    =?Utf-8?B?RGFjdW5h?=, Oct 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,361
    =?Utf-8?B?QWJoaXNoZWsgUGF0ZWw=?=
    Oct 19, 2004
  5. =?Utf-8?B?RGFjdW5h?=

    Includes in ASP.NET

    =?Utf-8?B?RGFjdW5h?=, Oct 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    385
    =?Utf-8?B?RXRoZW0gQXp1bg==?=
    Oct 19, 2004
Loading...

Share This Page