새 프로젝트에 복사 한 파일 뒤에 QuestionControl.ascx 및 QuestionControl.ascx.cs 코드가 있습니다.코드 숨김 코드가 * .ascx의 컨트롤을 인식하지 못함
'QuestionControl' does not contain a definition for 'rdbtnlstQuestion1' and no extension method 'rdbtnlstQuestion1' accepting a first argument of type 'QuestionControl' could be found (are you missing a using directive or an assembly reference?)
이 내 *의 .ascx의 상단에 :
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="QuestionControl.ascx.cs" Inherits="QuestionControl" %>
나는 '내가 프로젝트를 빌드 할 때 ASCX에 선언 된 컨트롤 파일 뒤에 코드에서 언급되는 날이 오류를 제공합니다 또한 코드 숨김 해봤 :
,536 :<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="QuestionControl.ascx.cs" Inherits="QuestionControl" %>
이 코드 숨김 파일에 내 클래스의 상단이다, 그것은 네임 스페이스에 포함되어 있지
public partial class QuestionControl : System.Web.UI.UserControl
{
다른 컨트롤과 함께 빈 ascx를 추가하면 해당 컨트롤도 컴파일되지 않습니까? – Tejs
이 버전은 .NET 프레임 워크의 어떤 버전입니까? 그리고, 확실하게,이 MVC 또는 WebForms입니까? –
네임 스페이스를 확인 했습니까? – Glennular