Best way to share ASP.NET .ascx controls across different website applications

asp.net

Suppose you have 2 different ASP.NET applications in IIS. Also, you have some ASCX controls that you want to share across these 2 applications.

What's the best way to create a "user control library", so that you can use the same control implementation in the 2 applications, withuot having to duplicate code?

Controls have ASCX with HTML + code behind.


Composite controls will be difficult, because we work with designers who use the HTML syntax in the ASCX files to style the controls.

Tundey, we use SVN here. Do you have an example on how to implement your suggestion? How can SVN share the ASP.NET controls?

Thanks!

Best Answer

Scott Guthrie gives some great advice here on how to set up a User Control Library project, then use pre-build events to copy the user controls into multiple projects. It works really well.

http://webproject.scottgu.com/CSharp/usercontrols/usercontrols.aspx

Related Topic