Last post Mar 20, 2017 05:05 PM by javier x brenes
Mar 17, 2017 03:45 PM|javier x brenes|LINK
I'm working on a ASP.net MVC project but I need to call into my project partial views from other projects, for instance, my "father project" has an area to displays partial views but this partial views must be comming from "children project"
How can I do that ?
Mar 20, 2017 02:43 AM|Jean Sun|LINK
javier x brenes
for instance, my "father project" has an area to displays partial views but this partial views must be comming from "children project"
You can try the following scenario.
1. Create a partial view in your children project's /Views/Shared folder.
2. Navigate to your father project's Views/Shared folder.
3. Use Add -> Existing Item
4. Select the partial view from the children project and click on a small down arrow next to the
Add button and choose Add as link.
In this case you will have a partial view only in one project and any changes to it will automatically be applied to other project as well.
Reference Link :
Mar 20, 2017 03:55 PM|javier x brenes|LINK
Thanks Jean for your answer, the idea is call the partial view dynamically, I want to have the URL on my DB and if the user chooses that "program", The app will open the partial view into it, It's like to have children "programs" opened by their father.
Mar 20, 2017 04:54 PM|PatriceSc|LINK
Or if it doesn't help, describe first your exact goal. For now we start to discuss a technical solution but we can't tell much about it as we (or at last I) have no idea about the problem it is supposed to solve.
My take would be perhaops MVC areas:
https://www.codeproject.com/Articles/714356/Areas-in-ASP-NET-MVC (which seems unrelated to having path in a db, even if you have path in a db you have something that must be able to handle requests to this path).
Mar 20, 2017 05:05 PM|javier x brenes|LINK
Hello, I think MVC areas will help me, I'm going to read about them.