[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Reusing UserControls via IIS virtual directory or something?

Posted on 2007-10-20
3
Medium Priority
?
317 Views
Last Modified: 2012-06-22
hi,

i have a user control (ascx) that has a javacript file and css file. I want to be able to use it in two separate web projects. This is for .NET2.0.
I tried making the usercontrol web project a virtual directory, however the other two web projects still could not use the controls.
Tried this.
<%@ Register Src="~/UserControlLibrary/MYUC.ascx" TagName="MyControl" TagPrefix="MyCompany" %>
UserControlLibrary is my virtual off the localhost.

how do i do this?

thanks
0
Comment
Question by:Valimai
3 Comments
 
LVL 11

Expert Comment

by:cmhunty
ID: 20114217
If you're using Visual Web Dev 2005 Express, I don't think this can be done (please correct me if I'm wrong.......). If you're using the full version of Visual Studio, create new project and select ASP.NET server control. When you've build your control, you can compile it and add it to any web appllication that you create. You don't need VS to add the control.

HTH

Chris
0
 
LVL 16

Accepted Solution

by:
McExp earned 2000 total points
ID: 20114248
Try the instructions on the following MS page. If they don't work in VS Express tell us and I will look for an alternate solution.

http://msdn2.microsoft.com/en-us/library/aa479564.aspx
0
 
LVL 1

Author Comment

by:Valimai
ID: 20116475
thank you very much, the article demonstrated exactly what i needed to do.

using automated build scripts, I can publish (manually) and each web project that needs the control library can copy from the published location (currently automated) on build.

I am now trying to work out how to publish on post build automatically. I have started a new question for this at
http://www.experts-exchange.com/Microsoft/Development/.NET/Visual_Studio_.NET_2005/Q_22906451.html

thanks heaps
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

864 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