Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# ASP NET Web窗体无法注册用户控件(ascx)_C#_Asp.net_Webforms_User Controls_Ascx - Fatal编程技术网

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).