入门命名空间名称找不到ASP.net用户控件 [英] Getting namespace name not found for ASP.net user control
问题描述
所以我有问题,当我尝试发布的网站。
我在Visual Studio 2008 SP1。
So I'm having problems when I try to publish the website. I'm in visual studio 2008 sp1.
我有一堆用户控件和几页我使用他们的编程方式。
I've got a bunch of user controls and on a few pages I'm using them programatically.
我已经得到了aspx页面上的参考
I've got a reference on the aspx page
<%@ Reference Control="~/UserControls/Foo.ascx" %>
然后在code behing我用
Then on the code behing I use
ASP.usercontrols_foo newFoo control = (ASP.usercontrols_foo)Page.LoadControl("~/UserControls/Foo.ascx");
如果我浏览到它工作正常的页面,但是当我转到发布网站,我得到一个编译时错误。
If I navigate to the page it works fine, but when I goto publish the website I get a compile time error.
推荐答案
哎呀,我对这个同样的问题流血发展小时。有没有人有一个解决的办法?
Argh, I'm bleeding development hours on this same issue. Does anyone have a solution to this ?
BTW:如果取消选中允许这台precompiled网站是更新它建立(右键单击该网站上,选择属性页,MSBuild的选项)
BTW: It builds if you uncheck "Allow this precompiled site to be updatable" (Right-click on the website, choose Property Pages, MSBuild Option)
但我需要的网站是更新。
But I need the site to be updatable.
这篇关于入门命名空间名称找不到ASP.net用户控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!