Building Component Libraries

One of the advertised benefits of using components is code reuse. You write a method once, and then you never need to write the same method again.

One problem with the components that have been created to this point is that they have all been application-specific. In other words, you cannot reuse the components across multiple websites without copying all the source code from one App_Code folder to another.

If you want to share components among multiple websites, you can no longer take advantage of dynamic compilation. To share components, you need to compile the components explicitly in a separate assembly.

Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.