By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,759 Members | 1,712 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,759 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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/de...ebControls.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"Eric" <er**********@hotmail.com> wrote in message
news:53*************************@posting.google.co m...
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

Nov 18 '05 #2

P: n/a
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

"Eric" <er**********@hotmail.com> a écrit dans le message de
news:53*************************@posting.google.co m...
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

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.