How do you build ASP.NET website using modules?

Posted on 2008-02-08
Medium Priority
Last Modified: 2013-11-26
Hi all,

I have a Visual Studio 2008 solution that looks like this:

BLL (C# Class Library)
DAL (C# Class Library)

What I want to be able to do is create modules that each of the websites can utilise. One of the modules I would like to create is a simple messaging module that can be used in each site that allows its users to send email like messages to people in their address book. I have looked into using the Microsoft Web Client Software Factory (WCSF) but this does not satisfy my needs. I also thought maybe of an ASP.NET Server Control but I dont think that is the way forward. Maybe I am using the incorrect architecture for the project?

Any suggestions from you experts out there?

Many thanks

Question by:Cragly
  • 2
  • 2
LVL 96

Expert Comment

by:Bob Learned
ID: 20854506
Create class library projects for the data access and business logic layers, and then reference those DLLs in the web site projects.

LVL 12

Expert Comment

ID: 20856069
Yeah just upload them to a directory called bin that is located in your root and you will be able to reference them from your code.

Author Comment

ID: 20856686
Thanks for your reply guys.

I understand what you are saying and that is how I would normaly build my apps but thsi time I want to build a complete module just as you would build an asp.net user control and reuse it across my web apps. So for instance if I created a control libary called Messaging I want to create a module that I can drop into each site. I was just not sure that a control libary was the best way to go for this.
LVL 12

Accepted Solution

lunadl earned 1500 total points
ID: 20857966
Well if you use other module based applications as examples, it is done in the manner in which we described. An alternative is using a directory called app_code in the root which is code that gets compiled when a page is called, the limitations are that all the code files must be the same language you reference it the same way. So if it is code that you are planning on changing often you will probably find it easier to do it this way instead of precompiling dll. Here is a more detailed explanation of the differences from msdn:

Author Closing Comment

ID: 31429334
Thanks for the help but have decided to go with a completely different archetecture but there is nothing wrong with the solution you provided so have awarded the points. Many thanks for your help.

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question