English 中文(简体)
我如何分享网站之间的用户控制/功能?
原标题:How do I share usercontrols/functionality between sites?

We have two asp.net sites (based on episerver).
Using Telerik Asp.net controls.
We have some functionality that we want to have available in both sites.
Right now one of the sites use webparts/usercontrols and the other uses usercontrols.

Is there any way to share the functionality between these sites?
What I would like is to be able to share usercontrols between the sites.

最佳回答

自您谈论用户控制以来 我假设你也拥有作为用户控制组成部分的.子文档,这就使这种trick弄。

我猜测,理想的解决办法是把所有东西都转移到服务器控制上,这样,你就只能提到大会,但如果你从其他控制机制继承,则你们的美物与它们 st。

处理方式之一是利用视频演播室的档案连接能力(现有的文件,点击 down,选择链接办法),在相同的解决方案中将同样的物理档案在项目之间分享。 这并不理想,因为你必须确保在部署之前把星号档案抄送两个地点(我以前用一个后方文字做过),但还有许多可能仍然很脆弱。

另一种较为复杂的方案,但可能是一种“更好的”处理方式,即使用Virtual Path Provider,为你工作:

问题回答

启动一个新的班级图书馆项目,在贵方的网站上都提到该项目,然后将共同的控制和代码输入图书馆项目。

和你提到的情况一样,你可以把档案放在现场环境中的甚低频目录中,因此只能把ASCX-档案拷贝到一个双倍的复印机上,以便有一个双现场编码。 随之而来的更新需要为这两个地点建造和超文本的DVDL。

如果你在自己的发展环境中使用特别志愿人员,你还可以设置一个避风机:从其中一个项目中把外部连接起来的夹,因此,只有该代码,并且在一个存放处修订历史。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签