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.
这篇关于不同项目中的用户控件程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:不同项目中的用户控件程序集?
基础教程推荐
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
