web user control and its files

I'm creating a web user control (file ascx,ascx.cs e ascx.resx) which is connected to a DB (i have other 2 classes and so 2 other files).

1.Is it correct or is it better to have only one file with all the classes

2.When I use my web user control, have i to copy all the files i used, true

THX




Answer this question

web user control and its files

  • cathiec

    No, you should put them in 1 project so they will be stored in one DLL. Then you can use then in every project you want by only adding the DLL to the reference of the project.

  • Bridgepark

    1. This is a matter of taste. If you're going to use some controls in onther projects I think it is convenient to have a file for each class.

    2. True



  • Lisa_99

    beh web user controls are used in other projects...i mean if it's better have only control file than even the other cs files.

  • web user control and its files