ASP.NET MVC动态加载用户控件,就像在ASP.NET Web窗体中一样 [英] ASP.NET MVC dynamically load user control, like in ASP.NET Web Forms

查看:130
本文介绍了ASP.NET MVC动态加载用户控件,就像在ASP.NET Web窗体中一样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hallo,
我的团队和我即将开始一个项目,我们很想使用ASP.NET MVC,而不是Web窗体。为什么?没有什么特别的,只是我们想要很好地学习,并衡量在未来的项目中使用什么会更好。

Hallo, my team and I are about to start a project, and we would really like to use ASP.NET MVC, not the Web Forms. Why? Nothing special, just we want to learn it well and to measure what would be better to use in future projects.

但是,我们的项目有重要的要求。我们需要能够动态加载用户控件,可以在运行时创建和上传。使用ASP.NET Web窗体,它的LoadControl方法很简单。

But, our project has important request. We need ability to dynamically load user controls, that can be created and uploaded in runtime. With ASP.NET Web Forms and it's LoadControl method it's simple.

我们可以使用MVC做类似的事情吗?

Can we do something like that with MVC?

Tnx

推荐答案

部分视图是您想要的。

MVC - 动态加载部分视图

这篇关于ASP.NET MVC动态加载用户控件,就像在ASP.NET Web窗体中一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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