Solved

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

Posted on 2016-08-18
5
34 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 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 41761189
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
ID: 41761205
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
ID: 41761207
Thanks!
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 41761213
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
ID: 41761350
Okay...thanks again!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

773 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