Confused about code reusability in ASP.NET

Results 1 to 2 of 2

Thread: Confused about code reusability in ASP.NET

  1. #1
    Join Date
    Dec 1969

    Default Confused about code reusability in ASP.NET

    On my current ASP based site, I keep a LOT of coding in "include files". For example, I have one include file that has my email component code and functions, and another for database access, and yet another with security based functions, etc. Then, whenever I need another page to use these functions, I just use an &#060;!--#include--&#062; statement in the ASP page. <BR><BR>Now, ASP.NET introduces "code behind" pages, and "pagelets". <BR>* Should I be using these instead of include pages now?<BR>* Can I include multiple code behind pages on one page?<BR>* Can I still use includes?<BR>* Is it really worth turning any of this into web services?<BR><BR>I&#039;m trying to make things as easy and as flexible as possible. Any comments and ideas would be appreciated!<BR><BR>-Todd Davis<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Confused about code reusability in ASP.NET

    Most of what you used includes for, can, and should be done with user controls in .Net. (*.ascx files).<BR><BR>Some of the things that you used includes for can be done in code behind, some in the web.config file (like DB connection strings) or using other .Net methods (I had at least two more in mind).<BR><BR>Yu *can* still use include files, but there is little, if any reason too...There are better ways now.

Posting Permissions

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