ASP.NET - How to use a user control from a different application?
How do I utilize a user control from Application B within Application A?
Application A is a VB.NET App
Application B is a C# app.
This code attempts to register the control for usage in an aspx file:
<开发者_Python百科%@ Register TagPrefix="uc1" TagName="Pager" Src="../ApplicationB/Controls/PagingControl.ascx" %>
I get the following error:
Parser Error Message: The virtual path '/ApplicationB/Controls/PagingControl.ascx' maps to another application, which is not allowed.
Can I use Application B's PagingControl.ascx within Application A?
Thanks
ASP.Net will only load binaries from either the GAC or from it's own folder structure. To use the control in both places you must compile it to an assembly that can be included in the bin folder for both applications.
精彩评论