...

View Full Version : advice regarding asp.net and includes



esthera
09-08-2005, 01:53 PM
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.

How?

rrhodes
09-09-2005, 03:26 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum