0

I am using Visual Studio 2010 to create a project based on the template "ASP.NET Web Site" (.Net Framework 4) with C# as the language.

I am trying to understand the setup of the project but I'm having trouble with (1) importing classes that I've coded for another project (2) where and how I save data related to the imported classes in the built-in data storage that obviously exists somewhere. I'm referring to the data storage that, for example, saves the user account information (also part of the template).

Also, if you could direct me to a site where this template is discuss in-depth I would be very grateful.

Nivid Dholakia
  • 5,272
  • 4
  • 30
  • 55
gigad111
  • 1
  • 1

1 Answers1

0

you should really read the whole article I linked in my comment above: ASP.NET Web Site or ASP.NET Web Application?

Shortly, a web site is simply not the best option if you have many classes existing in many different files and especially if you already have the code in other projects and want to import (reuse) it.

look at the short summary of web site, from the page I just linked:

Website:

The Web Site project is compiled on the fly. You end up with a lot more DLL files, which can be a pain. It also gives problems when you have pages or controls in one directory that need to reference pages and controls in another directory since the other directory may not be compiled into code yet. Another problem can be in publishing.

If VS isn't told to re-use the same names constantly, it will come up with new names for the dll files generated by pages all the time. That can lead to having several close copies of dlls containing the same class name, which will generate plenty of errors. The Web Site project was introduced with VS 2005, but has turned out not to be extremely popular.

so, I would really go for the web application approach and not for web site.

Community
  • 1
  • 1
Davide Piras
  • 43,984
  • 10
  • 98
  • 147