I have QuestionControl.ascx and the QuestionControl.ascx.cs file behind the file that I copied to the new project. When I create a project, any links in the code behind the file to the controls declared in ascx give me this error:
'QuestionControl' does not contain a definition for 'rdbtnlstQuestion1' and there is no extension method 'rdbtnlstQuestion1' accepts the first argument of the type 'QuestionControl' (you donβt see using the directive or assembly link?)
This is at the top of my * .ascx:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="QuestionControl.ascx.cs" Inherits="QuestionControl" %>
I also tried CodeBehind:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="QuestionControl.ascx.cs" Inherits="QuestionControl" %>
This is the top of my class in the codebehind file, it is not contained in the namespace:
public partial class QuestionControl : System.Web.UI.UserControl {
AaronLS
source share