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

  • Thread starter Thread starter Eric
  • Start date Start date
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
 
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
 
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
 
Back
Top