最毒世子妃全本小说网:vs2005中后台代码无法识别前台创建的控件

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 09:38:13
很奇怪,我的文件都是可视化创建的。前台包括
<%@ Control Language="VB" AutoEventWireup="true" CodeFile="ThemeSelector.ascx.vb" Inherits="CDMS.mySite.UI.Controls.ThemeSelector" %>

<asp:DropDownList
ID="ddlThemes" runat="server" meta:resourcekey="ddlThemesResource1" AutoPostBack=true>
</asp:DropDownList>

但是后台却无法识别ddlThemes。

另外Inherits="CDMS.mySite.UI.Controls.ThemeSelector"编译出错。说
context不是CDMS.mySite.UI.Controls的成员。可是我在后台已经申明了
Namespace CDMS.mySite.UI.Controls
Partial Class controls_ThemeSelector
Inherits System.Web.UI.UserControl
……
我研究了一下,发现是我的web.config编译有问题,他说我的架构有问题。无法识别各种元素。我把web.config文件重写了一遍就好了。今天打开后编译,有出现这种情况。很郁闷啊。我什么都没改。