473,324 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Beginner - Assemblies and Multiple .cs files

Hi,

I have an asp.net project and I am in the process of trying to make it
into a truly object-oriented project -- as I have just learned I cannot
have multiple codebehind files in a single page.

(The big picture is that I have a template file that has methods called
on page_load from a project.cs file and thus each derived template page
is "stuck" with the same codefile directive) Now I need to call
additional methods on these derived pages and I can't use page_load
because it would call it on every page.

So.....

In order to get around this problem I was told to create .dll's (or a
single .dll) and then just point the codefile reference at .dll's.
This way I can use class.method that I need after importing the
namespace and not worry about storing the code in one .cs file (as long
as I override the page_load).

Forgive the basic question but why would someone want to complie
multiple .cs files into one .dll? Do professional programmers create
one class per .cs file?

Thanks!

May 2 '06 #1
1 1652
It really depends on the project.
There's nothing wrong with combining a bunch of related classes together
into a single assembly.

"Ranginald" <da*******@gmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
Hi,

I have an asp.net project and I am in the process of trying to make it
into a truly object-oriented project -- as I have just learned I cannot
have multiple codebehind files in a single page.

(The big picture is that I have a template file that has methods called
on page_load from a project.cs file and thus each derived template page
is "stuck" with the same codefile directive) Now I need to call
additional methods on these derived pages and I can't use page_load
because it would call it on every page.

So.....

In order to get around this problem I was told to create .dll's (or a
single .dll) and then just point the codefile reference at .dll's.
This way I can use class.method that I need after importing the
namespace and not worry about storing the code in one .cs file (as long
as I override the page_load).

Forgive the basic question but why would someone want to complie
multiple .cs files into one .dll? Do professional programmers create
one class per .cs file?

Thanks!

May 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gerard | last post by:
Hi, I am developing a set of assemblies which will be shared by many applications and so I intended to place them in the GAC at runtime. However, these assemblies have associated configuration...
3
by: Sundararajan | last post by:
Dear Folks, Most documentation say that Assemblies are logical DLLs. really getting confused about the assemblies and DLLs. can any one of u help me to get a clear distinction between...
7
by: thechaosengine | last post by:
Hi all, Can anyone tell me if it is advisable (or even possible) to define a namespace across 2 or more assemblies? For example, consider the namespace SampleApplication.Data.Providers ...
8
by: Jason | last post by:
In my ASP.NET 1.1 solutions, I created several web projects and compiled them each into an assembly. The assembly names reflected the functionality of the feature (Membership.dll, Dues.dll, etc)....
7
by: Steve | last post by:
Hi all, I'm designing my DAL layer(s) for our suite of applications and I'm designing myself in circles, it's gotten to the point where each idea just mixes me up more :) We have 3 loosely...
3
by: Claudio Pacciarini | last post by:
Hi everyone, I have a question about .NET code sharing and reuse, and also about application design best practices / guidelines. Currently, we have many different .NET projects in source...
4
by: Arpan | last post by:
Assume that I am creating ASP.NET pages in the C:\Inetpub\wwwroot\ASPX directory. This directory has a sub-directory named \bin where in all DLLs are stored. Are these DLLs which are stored in the...
1
by: Dave Anson | last post by:
What is the recommended practice for referencing assemblies in a project from other solutions? I am using Visual Studio 2005 Team System. I have several assemblies in another solution which will...
16
by: MA | last post by:
Hi, We have added a shared assembly in GAC so that our multiple solutions can use use it. We use the publisher policy to controls the different versions of the assembly. This shared assembly...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.