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.
这篇关于不同项目中的用户控件程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:不同项目中的用户控件程序集?
基础教程推荐
- rabbitmq 的 REST API 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01