I am writing a Web Application in asp.net 4.0. I have a Solution say ControlLib, where I have my nested User Controls. I have another Solution say MainWebApplication, where i want to use the Nested User Control from ControlLib. I have added the .ascx,.dll
and pdb file of my ControlLib to my MainWebApplication. I have also added the Register tag to my MainWebApplication Page. I even tried it, By adding it in web.config of MainWebApplication. But i am Unable to get the Nested User Control in My MainwebApplication.
Please tell me how can i achieve this.
You are using .NET 4.0, that's enough I guess (I am assuming you are using VS2k10 /12), and this should work like a charm :
Right click on the solution explorer, add --> Add exisitng item --> navigate thru you user control, and click on the litter "v" after the 'Open' text, --->
Click on 'Add as link' ... and see if it does the trick.
If not, please build 'ControlLib' solution one more time (just to be on safe side) and copy the .dll for the
(all) the class(es) that you've used for that control to your 'MainWebApplication' solution at appropriate location and from within the solution explorer of 'MainWebApplication', go to add referance by right clicking on the referance
folder and add referances to your Current Project
(if your solution contains multiple projects)
Curiouspo
Member
1 Points
4 Posts
User Control in other Web Application
Dec 08, 2012 07:33 AM|LINK
I am writing a Web Application in asp.net 4.0. I have a Solution say ControlLib, where I have my nested User Controls. I have another Solution say MainWebApplication, where i want to use the Nested User Control from ControlLib. I have added the .ascx,.dll and pdb file of my ControlLib to my MainWebApplication. I have also added the Register tag to my MainWebApplication Page. I even tried it, By adding it in web.config of MainWebApplication. But i am Unable to get the Nested User Control in My MainwebApplication. Please tell me how can i achieve this.
Thanks In Advance
aarsh
Participant
1543 Points
427 Posts
Re: User Control in other Web Application
Dec 10, 2012 02:42 AM|LINK
You are using .NET 4.0, that's enough I guess (I am assuming you are using VS2k10 /12), and this should work like a charm :
Right click on the solution explorer, add --> Add exisitng item --> navigate thru you user control, and click on the litter "v" after the 'Open' text, ---> Click on 'Add as link' ... and see if it does the trick.
If not, please build 'ControlLib' solution one more time (just to be on safe side) and copy the .dll for the (all) the class(es) that you've used for that control to your 'MainWebApplication' solution at appropriate location and from within the solution explorer of 'MainWebApplication', go to add referance by right clicking on the referance folder and add referances to your Current Project (if your solution contains multiple projects)
Good luck !
Curiouspo
Member
1 Points
4 Posts
Re: User Control in other Web Application
Dec 13, 2012 10:11 AM|LINK
Thanks....