我想要一个硕士UserControl的(母版页,但对于用户控件) [英] I want a Master UserControl (a Master page, but for UserControls)

查看:80
本文介绍了我想要一个硕士UserControl的(母版页,但对于用户控件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ASP.NET母版页 - 本质的东西

ASP.NET master pages - essential things.

不过,我有很多在我的项目非常相似的用户控件 - 它可能是一个AJAX ModalPopup标准布局,或一些更复杂的

However, I have a lot of very similar UserControls in my projects - it might be a standard layout for an AJAX ModalPopup, or something more involved.

我希望我能摆脱我的一些重复code的(无论是在ASCX文件和code-后面)与一些用户控件硕士

I wish I could get rid of some of my duplicated code (both in ascx files and code-behind) with some Master UserControls.

有没有人有一种方式有任何建议,以实现这一目标?

Does anyone have any suggestions of a way to achieve this?

推荐答案

我可以建议你在找什么最接近的事是一个的模板的自定义控制。不幸的是,跨项目共享控制是一个容易得多,如果那些东西自定义控件,没有一个ascx的文件。

The closest thing I can suggest for what you are looking for is a templated custom control. Unfortunately, sharing controls across projects is a lot easier if those things are custom controls, without an ascx file.

这篇关于我想要一个硕士UserControl的(母版页,但对于用户控件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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