TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Eric Flamm
NA
6
0
Exception in ASP.Net
Jul 3 2007 3:05 AM
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 context
N:\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?
Reply
Answers (
1
)
InitializeComponent() error
Visual basic: Navigating treeview by using next and previous buttons