off the top of my head:
Is the code behind file registered in the top line of the ASPX file?
<%@ Page Title="Title" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true"
CodeBehind="Page.aspx.cs" Inherits="MyNameSpace.Page" %>
Has the designer file been deleted, or otherwise corrupted? if so try deleting the deigner file. VS should regenerate it for you.
Check the build action on the designer/code behind files and make sure that they are both set to 'Compile' (you can change this setting by right-clicking on the files in VS and seleting properties, build action should be in the file properties editor)
Make sure your project file is set up correctly. sometimes going through a project file upgrade (like when you change VS versions) or simply sharing project files through a source contorl system can cause things to get out of whack. confirm that for your files you have entries that look like this in your csproj file (confirm with a text editor, notepad is fine):
<Compile Include="Page.aspx.cs">
<DependentUpon>Page.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Page.aspx.designer.cs">
<DependentUpon>Page.aspx</DependentUpon>
</Compile>
I hope one of these solves your problem!