I've got two files in the same directory, an ascx file and an ascx.cs file with a C# class defined inside of it.
This is the code in my .ascx file
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Test.ascx.cs"
Inherits="SITE.UI.Controls.Test" %>
And this is the code in Test.ascx.cs:
using System;
using System.Web.UI;
namespace SITE.UI.Controls
{
public partial class Test : System.Web.UI.UserControl
{
}
}
However whenever I try and build the site I always get this error:
Error 1 Could not load type 'SITE.UI.Controls.Test'
I'm sure I must be doing something obviously wrong but after over an hour of thrashing I'm getting nowhere . . .