Hi,
I've picked up a partially developed ASP.Net app in c#. There's a page called ErrorDisplay.aspx, with a code behind of ErrorDisplay.aspx.cs. So far, so good. The code behind defines a partial Class ErrorDisplay, with a property ExceptionDetails (of type Exception).
The catch code on all the other pages reads:
catch (Exception ec) { ErrorDisplay.ExceptionDetails = ec; Response.Redirect("ErrorDisplay.aspx"); }
But, when I build the site, I get a collection of errors:
"The name 'ErrorDisplay' does not exist in the current contextN:\My Documents\ASPNET\Project1\Logon.aspx.cs"
All of the pages are at the same level, and I don't think there's a Namespace issue - I tried wrapping ErrorDisplay in a Namespace command, but VS protested there was already an ErrorDisplay class in the global namespace.
So why am I getting these "does not exist in current context" errors, and how do I fix it?