Click here to Skip to main content
15,849,829 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have 2 Projects Like Project1 and Project2. I wanna Call Partial View (Action Method) in 'Settings' Controller and 'Load' Action Method(Partial View) from Project1 to Project2. And I wanna call Some Script files like Settings.js Script from Project1 to Project2.

Thanks in Advance

What I have tried:

I am trying to call or use Project1 Partial Views, Scripts from Project1 to Project2
F-ES Sitecore 24-May-16 7:53am    
"Project" is a concept of the IDE, it is meaningless when it comes to how the code runs. What matters is how the projects are deployed; are the both in the same solution? Are they both web projects or is one web and one class project and so on.
Sergey Alexandrovich Kryukov 24-May-16 10:09am    
It also is a concept of the build, more importantly. And you are right, it's meaningless during runtime, or, more exactly, it does not exist at all. The whole idea of this question makes no sense.
Member 10185262 24-May-16 8:09am    
Both are Web Projects in Same Solution
Sergey Alexandrovich Kryukov 24-May-16 10:16am    
Please see the comments above. Unfortunately, the question makes no sense. "Call" is the aspect of runtime, where there are no projects. There is no such concept as "call a view" or "call a file". You can call method (function/procedure/subroutine), operator, property; a method of one assembly can call a method of another assembly... Another thing to understand is the stateless nature of HTTP, different roles of server and client sides, life cycle... Two different pages cannot communicate directly via a "call"...
F-ES Sitecore 24-May-16 10:19am    
There is no real way of sharing these things. You could share Controllers etc but it would mean one project having references to (ergo all the code from) the other project so both projects would be in both websites, but only one project would be the active site.

If you google for sharing views etc between projects you'll probably find some hacky solutions, but it sounds like an anti-pattern; rather than looking at how you can do this you should be trying to find a more elegant solution to the problem that has made you want to do this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900