Solved

Visual Studio 2013 /  VB.NET   /   Cross solution web user controls

Posted on 2016-08-18
5
27 Views
Last Modified: 2016-08-18
I have a web user control that I have developed for a particular solution in Visual Studio.

There is another solution that also needs the same web user control now.

How can I keep ONE code base for the web user control while still making it available to multiple solutions?

Can I put it into a DLL?  Create a new solution dedicated to the web user control that has the needed dependencies?

What is the best practice?

Keep in mind that the web user control has dependencies.  Up until now, this was not a problem because all of the needed dependencies resided in the same solution the web user control resides in.  So those dependencies (i.e. bootstrap and moment.js) will also have to be made available (somehow) to other solutions who won't necessarily have the same structure or supporting files.
0
Comment
Question by:knowlton
  • 3
  • 2
5 Comments
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
Comment Utility
creating a DLL is exactly the way to go. Think about all the various 3rd party controls library out there (Telerik, Infragistics, DevExpress, ...) they are all creating DLLs for you to reuse.
0
 
LVL 5

Author Comment

by:knowlton
Comment Utility
So essentially -- a new solution that compiles as a DLL library?

Let me ask you, are there any gotchas / tips / tricks when attempting to write something that will be shared among solutions?

In other words, what are the top 5 common problems people run into when they try to do this sort of thing?
0
 
LVL 5

Author Closing Comment

by:knowlton
Comment Utility
Thanks!
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
it is a project that will compile as a DLL. A solution is a set of various projects.

It is easier to debug your component if you create a solution with both your web application project and your component project. The debugger will be able to go from one to the other as if it was a single project.
0
 
LVL 5

Author Comment

by:knowlton
Comment Utility
Okay...thanks again!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now