Question: I have a QuestionControl.ascx and a QuestionControl.ascx.cs code behind file I copied to a new project. When I build the project any references in the code behind file to controls declared in the ascx gives me this error:

> 
> '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?)
> 
> 
> 

This is at the top of my \*.ascx:

```
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="QuestionControl.ascx.cs" Inherits="QuestionControl" %>

```

I've 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 a namespace:

```
public partial class QuestionControl : System.Web.UI.UserControl
{

```

Answer: 
Another solution is to: 

* open your .ascx page in **design view**
* right click anywhere on the page and select **Refresh**

(.ascx.designer.cs file may need to to be closed while doing refresh for this to work)
I was having the same issue, the code-behind didn't recognize the controls on the .aspx page. I'm using VS 2012. I right-clicked the project; clicked on Convert to Web Application; and it added all the designer files that weren't there at all before. I rebuilt everything and it's good now.