Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to render partialView from another application? [duplicate]

I have 2 applications published in the same site in iis, so the only diference between both is the virtual path, ex: localhost:2020/app1 and localhost:2020/app2. My problem is that in the app1, I want to call a partialView from the app2 and I can't add the references from the app2 to the app1. Any idea how to do that?

like image 260
Joao Correia Avatar asked Mar 18 '26 08:03

Joao Correia


1 Answers

The only reasonable way (to me at least) to do this is to move shared partial views to separate library and use RazorGenerator tool to generate code for them. Then when you will reference the library in web projects of both applications those views will be available to use.

like image 186
mr100 Avatar answered Mar 20 '26 21:03

mr100



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!