来自另一个MVC应用程序的MVC渲染(RenderPartial,RenderAction)HTML [英] MVC Rendering (RenderPartial, RenderAction) Html from another MVC Application

查看:87
本文介绍了来自另一个MVC应用程序的MVC渲染(RenderPartial,RenderAction)HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个由许多团队负责的环境中工作,这些团队负责页面上的特定内容.每个团队都在共享特定的信息(公共类库和母版页),每个信息将提供不同类型的内容.

I am working in an environment with many teams who are responsible for specific content on pages. Each team is sharing specific information (common class libraries, and master pages) that each are going deliver different types of content.

MVC应用程序是否可以执行与RenderPartial类似的操作,并将模型传递给另一个MVC应用程序Controller/Action以返回内容?

Is it possible for an MVC application to do something similar to RenderPartial and pass a model to another MVC application Controller/Action to return content?

因此,此代码可能如下所示: ( http://www.mydomain.com/Home/Index )

So the code for this might look like: (http://www.mydomain.com/Home/Index)

<% Html.RenderAction("ads.mydomain.com", "Home", "Index", AdModel) %>

也许这不是一个好主意,因为另一个线程必须旋转以提供部分视图的服务器?

Maybe this is not a good idea as another thread has to spin up to server a partial view?

推荐答案

原则上可以,尽管您的问题有点含糊.

In principal yes, though your question is a little vague.

看看Codeplex上MvcContrib中的便携式区域".该技术允许独立的团队开发独立的MVC应用,然后由中央应用进行协调.

Have a look at "portable areas" within MvcContrib on codeplex. This technique allows separate teams to develop separate MVC apps that would then be orchestrated by a central application.

这篇关于来自另一个MVC应用程序的MVC渲染(RenderPartial,RenderAction)HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆