C# ASP NET Web窗体无法注册用户控件(ascx)
我有一个具有以下指令的用户控件C# ASP NET Web窗体无法注册用户控件(ascx),c#,asp.net,webforms,user-controls,ascx,C#,Asp.net,Webforms,User Controls,Ascx,我有一个具有以下指令的用户控件 <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SelectorControl.ascx.cs" Inherits="SelectorControl" %> 对不起,当你说更改“代码文件”时,你是说视觉部分吗?你到底改变了什么?@Julián在control的指令中,我将codebeahind=“S
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SelectorControl.ascx.cs" Inherits="SelectorControl" %>
对不起,当你说更改“代码文件”时,你是说视觉部分吗?你到底改变了什么?@Julián在control的指令中,我将
codebeahind=“SelectorControl.ascx.cs”
更改为CodeFile=“SelectorControl.ascx.cs”
<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="FolderDistribution.aspx.cs"
Inherits="SearchFolder.FolderDistribution" %>
<%@ Register TagPrefix="UC" TagName="TemplateSelection" Src="~/Controls/SelectorControl.ascx" %>
<div>
<UC:TemplateSelection ID="templates" runat="server" />
</div>
The base class includes the field 'templates', but its type (TemplateSelection) is not >compatible with the type of control (ASP.controls__templateselection_ascx).