Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    May 2004
    Thanked 0 Times in 0 Posts

    advice regarding asp.net and includes

    i'm reposting as I posted in the asp forum but I think this is the correct place.

    I have a asp.net small application that I needed to do in .net and could not do in asp.

    the rest of my files on the server are all in asp and I want to include files (for headers and footers and other parts of the page) that are .asp files.

    Can I do this?
    Can I mix asp and asp.net or at least include asp files in an asp.net page.


  2. #2
    New Coder
    Join Date
    Aug 2005
    Thanked 0 Times in 0 Posts
    Yes, you can #include asp files into aspx pages, but I think you could run into trouble if you have asp server side code in those files. One, there is an "ASP Compatibility" page directive you can use in your ASPX pages that might help. Two, ASP and ASP.net use different Session mechanisms, so a session var in ASP may not be available in ASP.NET.

    For Headers and Footers, I find creating ASP.NET "user controls" to be a better solution than includes. Once you master user controls, you will never need to use include files again.
    Gee! Web Tools
    Web Content Management / Internet Marketing modules including:
    Page Editor - Calendar Manager - News Editor - Contact Organizer - Mail Wizard


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts