ASP.Net User Control Best Practice
2007-12-05 15:14
561 查看
My previous post about invalid cast exceptions turned out to be inaccurate. Unfortunately, it was more in depth than that. I am working on a project that has 37 user controls. Until today, those controls were dispersed throughout the project in different sub folders. This apparently is a bad practice. If you have controls in two separate folders and Control A in folder Z references Control B in folder Y; and then you have Control C in folder Y referencing Control D in folder Z, that creates a circular reference. This is because each folder in a website compiles into a separate assembly. Assemblies cannot have circular references.
Here's an article explaining it a bit more. Moral of the story, put all your controls in a single directory or take the painstaking effort to be sure references don't exist in two directions.
Here's an article explaining it a bit more. Moral of the story, put all your controls in a single directory or take the painstaking effort to be sure references don't exist in two directions.
相关文章推荐
- ASP.NET WebUserControl to SharePoint WebPart Best Practice (vs2008)
- ASP.Net AJAX+userControl+js实现仿igoogle效果网站
- ASP.NET User control cache 和 Response cookie 你所不知道的事
- ASP.Net AJAX+userControl+js实现仿igoogle效果网站
- Build User rights control system in Asp.net.(Windows Form Authentication)
- ASP.Net AJAX+userControl+js实现仿igoogle效果网站
- ASP.Net AJAX+userControl+js实现仿igoogle效果网站
- Asp.Net 2.0 开发加速之 - Ilungasoft.Helper.Web.UI.MasterPage/Page/UserControl 精装版
- Asp.Net 可定制分页用户控件【转:http://www.tracefact.net/Asp-Net/Extensible-Paging-User-Control.aspx】
- ASP.NET2.0 - 在 Web.config中注册ASP.NET User Control
- ASP.Net AJAX+userControl+js实现仿igoogle效果网站
- ASP.NET GoogleMaps User Control
- asp.net中转换web user control为custom web control
- A Simple Date Selector User Control in ASP.NET (JavaScript based)
- ASP.NET AJAX Roadmap--Server Controls (13): ScriptManager Control Overview
- 《ASP.NET AJAX程序设计 第I卷 服务器端ASP.NET AJAX Extensions与ASP.NET AJAX Control Toolkit》连载&最新更新
- 《ASP.NET AJAX程序设计 第I卷 服务器端ASP.NET AJAX Extensions与ASP.NET AJAX Control Toolkit》连载&最新更新
- 《ASP.NET Ajax程序设计-第I卷:服务器端ASP.NET 2.0 AJAX Extensions与ASP.NET AJAX Control Toolkit》2007年4月16日 china-pub全国首发!+ 赠书名单已经确定
- asp.net日期选择控件TestControl(v1.0.1).rar
- 在Sharepoint里面使用ASP.NET AJAX Control Toolkit