Click to See Complete Forum and Search --> : How Can I #INCLUDE Multiple Source Files Like in ASP?
llyal2000
May 24th, 2004, 07:29 PM
How Can I #INCLUDE Multiple Source Files Like in ASP?
I would like to manage my groups of routines and classes in separate files. I could do this in ASP using the #INCLUDE statement. How does one do this technique in Asp.Net? Asp.Net seems to only allow one code-behind file forcing all code has to be in one file. This is a mangement nightmare. I hope Asp.Net is not this restrictive.
Thank you,
--Llyal
coolbiz
May 25th, 2004, 07:45 AM
Forget about #INCLUDE directive. It has been abused so much that MS should just remove it from ASP.
In VB.NET, you work with MODULES and CLASSES. So if you have common codes to be shared across pages, put it into a MODULE so that you can call it from anywhere (as long as defined as PUBLIC). Or put it in a CLASS that you can instantiate from your ASPX pages.
-Cool Bizs
llyal2000
May 27th, 2004, 02:13 AM
I have success making classes in VB.Net and C#. But i guess don't have a good understanding of the ASP.Net architecture yet. I was expecting to explicitly reference files that are other than the code-behinds files. All tutorials i have read on ASP.Net only talk about code-behinds. I am porting a custom error handling infrastructure from classic ASP and want to put it in its own namespace/classe in a separate file to be used on all ASP.Net projects. I see i need to get more background information on ASP.Net. I have found the Microsodt ASP.Net starter kits. I think they will answer some of my questions as seeing real-world examples is like a picture worth a thousnd words. I also went out and bought the Microsoft book on Asp.Net.
Thanks again,
--Llyal
coolbiz
May 27th, 2004, 06:35 AM
Cool. Just post any questions that you might have.
-Cool Bizs
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.