two seperate ASP.net Web apps to share one ascx file

E

Eric

I have a header server(.ascx) control that I want to use with all my
existing seperate web apps. These web apps are configured as seperate
web apps in IIS but when I try to build my solutiuon referencing an
..ascx that lives outside the application I get a failure.

Is there any way to have a global ascx file that multiple seperate
applications can use?

Thanks

Eric
 
S

Steve C. Orr [MVP, MCSD]

There is no supported way to share a user control between projects, although
there is a hack or two around that I've heard about.
The easiest way is to just copy the ASCX and paste it into your other
application.
The "right" way to create a control that is easily reusable across multiple
projects is to create a custom control instead of a user control.
Here's more info:
http://msdn.microsoft.com/library/d...l/vbconWebUserControlsVsCustomWebControls.asp
 
P

Patrice

You could :
- copy the ASCX file
- or you could create a virtual directory that points tot the location of
this user control

Generally a user control contains code that is particulart to an app. A
server control is more suitable for use in a whole range of applications...

Patrice
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top