hello group members,

can you suggest me how to structure C# web application

I know that by default files are organized in much better way, but I need to know how a professional web-application is created.

how can I do "separation" of code in much better way ?

thanks

You can divide your web application into a 3-tier architecture namely 1. Presentation Layer 2. Business Layer 3. Data Access layer.

1. Presentation Layer
You can put your .aspx files, images, user controls, javascript files, css files etc in this UI layer. Create separate folders to have image, JavaScript, CSS files in this layer. Basically a web site or web application in Visual Studio will be created as a presentation layer.

2. Business Layer
You need to implement business logic components related to your application in this layer. Business layer is generally implemented as a class library in VS 2005/2008. A reference to this project will be added in presentation layer and the classes of this layer will be instantiated and its method will be called in presentation layer classes.

3. Data Access Layer
Your data access logic will be implemented in this layer. It will be implemented as a class library in VS 2005/2008. A reference to this project will be added in business layer. The classes and methods of this layer can only be used in business layer and cannot directly be used in presentation layer.

Check these links.
Three Tier Architecture in ASP.NET
3-Tier Architecture in ASP.NET with C#

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.