Im experiencing some craziness that I just can't figure out..
ive created the following class:
public abstract class AbstractView<T> : ViewPage<T> where T : class
which gives me some useful helpers and im using it in my views like this:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="Project.Web.Mvc.AbstractView<Project.Domain.Entities.Example>" %>
This all works fine. Now ive got to make a view which needs lots of complex rendering code, so i want to give my view a codebehind, so i can put all this presentational logic in it.
However, when I do:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="Project.Web.Views.Examples.View" CodeBehind="~/Views/Examples/View.aspx.cs" %>
public class View : Project.Web.Mvc.AbstractView<Project.Domain.Entities.Example>
Model is always null when i debug the view, which subsequently gives me:
"The view 'View' or its master could not be found. The following locations were searched..."
Whats going on?
Andrew
P.S. dont tell me codebehinds are evil. Im writing presentation specific logic, and lots of it. Its not going inline in the aspx.