不同项目中的用户控件程序集?

User Controls assembly in different projects?(不同项目中的用户控件程序集?)

本文介绍了不同项目中的用户控件程序集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人举例说明如何将用户控件存储在程序集中以便在多个项目中重复使用?

Does anyone have an example on how to store user controls in an assembly for reuse across multiple projects?

我使用我的 UserControls 制作了一个程序集,但是当我尝试注册该程序集时遇到了很多麻烦.最后它起作用了,但是当我尝试访问一个事件时,我遇到了错误对象引用未设置为对象的实例",

I made an Assembly with my UserControls, but I had a lot of trouble when I tried to register the assembly. Finally it worked but then when I tried to access an event I had the error "Object reference not set to an instance of an object",

非常感谢.

推荐答案

非常感谢大家的回答和时间.我想我会在我的所有项目中继续处理代码,因为这变得太复杂了,我也在 MSDN http://msdn.microsoft.com/en-us/library/aa651710%28VS.71%29.aspx 基本上说我们必须在每个应用程序中制作单独的副本,否则我必须使用Web 自定义控件",我的想法是重用这些用户控件而不是重写它们.现在我要找我的老板杀了他给我这个任务,让我在这个问题上浪费3天!!;)非常感谢克里斯编辑我的问题,有时我的英语很糟糕.

thanks very much guys for your answers and time. I think that I'm going to keep coping code in all my projects, cause this is getting too complicated, also I've found this article in MSDN http://msdn.microsoft.com/en-us/library/aa651710%28VS.71%29.aspx basically said that we have to make a separate copy in each application, Otherwise I have to use "Web custom controls" and my idea was to reuse those User controls and not to rewrite them. Now I have to look for my boss and kill him for give me this task and make me waste 3 days with this problem!! ;) Thanks very much Chris for editing my question, sometimes my english is terrible.

这篇关于不同项目中的用户控件程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:不同项目中的用户控件程序集?

基础教程推荐