Search code examples
user-controlsascx

Is it possible to isolate an ascx controls in a separate project?


Is it possible to isolate an ascx controls in a separate project? I tried to create a project 'class library' and I can not add ascx component.


Solution

  • Yes it is.

    You can produce all stuff in the other project(web application), but when You are using ascx You have to make reference to Your ascx project and also You need to copy all ascx files into proper place in project where You want use it.

    You can also use ClassLibrary, but then You need to create .ascx files and codebehind files manually and when using it You have to also copy ascx files into main project.