共享用户控件acrros多个网站 [英] Sharing user controls acrros multiple websites

查看:325
本文介绍了共享用户控件acrros多个网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在对涉及三个不同的网站有很多常用功能的项目。此刻的通用功能被放置在不同的网站完全用户控制。

I am currently working on a project which involves three different websites with a lot of common functionality. At the moment the common functionality is placed in a different website full of user controls.

的问题是跨多个网站共享用户控件。在SO和其他网站环顾四周,唯一的解决办法似乎是使用虚拟目录。由于这是一个可行的解决方案(目前摆在我们这一点)它似乎不是一个干净的解决方案不会。

The problem is sharing the user controls across the multiple websites. Looking around on SO and other websites, the only solution seems the be using virtual directories. As this is a workable solution (we us this at the moment) it doesn't seem as a "clean" solution.

其中最佳做法的分享共同存在功能(包括GUI / HTML)不同的网站之间?

Which "best practices" exist on sharing common functionality (including the GUI/HTML) between different site?

它是(例如)可以创建一个Web应用程序项目和部署子目录(每一个都有自己的网络的.config)不同的生产环境?

Is it (for example) possible to create a single Web Application project and deploy subdirectories (each with their own web.config) to different production environments?

推荐答案

有一个的解决方案获得通过建立共享的用户控件的用户控件库的由ScottGu描述。在我看来,这个解决方案不是很干净也一样,因为你要复制周围的预编译的文件,使这个解决方案的工作。

There is a solution for sharing user controls by building user control libraries described by ScottGu. In my opinion this solution isn’t very clean too, because you have to copy precompiled files around to make this solution work.

我决定使用单独的自定义Web控件类库来分享共同的UI功能。但是,也许斯科特的解决方案适用于你。

I decided to use custom web controls in separate class libraries to share common UI functionality. But maybe Scott’s solution works for you.

这篇关于共享用户控件acrros多个网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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