Q: Accessing User Control

  • Thread starter Thread starter Soul
  • Start date Start date
S

Soul

Hi,

Is there possible for a .aspx page access a user control located in other
website?

I try to put the full "http" URL of the .ascx file in the Src of "<%@
Register TagPrefix="uc1" TagName="UCName" Src="AnUserControl.ascx" %>", but
it wouldn't work, from the error message I can see that it actual map using
local file path. Therefore, I just would like to ask is that possible to
access a user control located in other website?

Thank you.
 
A user control must exist in the same application boundary as the page
that loads it. It be located in the same virtual directory or in a sub
folder in the virtual directory, assuming that the sub folder is in
the same application boundary.

This is true even if the user control does not have a code-behined.

A User Control is designed to be used by a single web application. If
it has a code-behind, then it's code is compiled into the web
application's dll.

You can create a web custom control that compiles into an individual
dll. You can then reference this dll in other web application.
However, the dll will need to reside in the bin folder of each web
application.

Tommy,
 
Thank you for clearing my doubt. Now I shall stop searching up and down on
how can it be done... :)

--
Soul


| A user control must exist in the same application boundary as the page
| that loads it. It be located in the same virtual directory or in a sub
| folder in the virtual directory, assuming that the sub folder is in
| the same application boundary.
|
| This is true even if the user control does not have a code-behined.
|
| A User Control is designed to be used by a single web application. If
| it has a code-behind, then it's code is compiled into the web
| application's dll.
|
| You can create a web custom control that compiles into an individual
| dll. You can then reference this dll in other web application.
| However, the dll will need to reside in the bin folder of each web
| application.
|
| Tommy,
|
| >
| > [Snipped]
| >
 
Back
Top