'Context' is not a member of...

LadyReader1

Member
Joined
Apr 11, 2007
Messages
10
Programming Experience
10+
I think I must have accidentally deleted something in my VB asp.Net program. I went from 0 errors when I built the solution to 97 a moment later.

The first two error messages were the same:

VB.NET:
'Context' is not a member of...
followed by a web page name.
It apears on line:
VB.NET:
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]CType[/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].Context.Profile,System.Web.Profile.DefaultProfile)[/SIZE]

Can someone explain or at least suggest what's happening here?

Thank you.
 
Last edited:
The HttpContext.Profile Property is new to .NET V2; your profile says you're using .NET 1.1 :confused: I'll have to assume you are using .NET 2.0

Are you using codeBehind or inline code? I've seen many errors occur if you are using inline code and don't have well formed HTML somewhere in the page. For example if you accidentally delete a closing tag. If this is the case, the first thing you'll want is look for the plus signs in a box to the left side of the markup (the ones that allow you to collapse a block of code). If you have an opening tag that should be collapsible and a plus sign isn't shown, look to see if it has a closing tag. Otherwise, you'll just have to go through the code line by line to find the error.
 
Thanks for replying. My profile says 1.1 because I ahven't updated it. Actually, I am supporting and enhancing older programs but currently writing new code in VB.Net 2.0.

I think you are on the right track regarding that missing closing tag. Unable to track down the error last week, I deleted the web page I was working on and rebuilt it from scratch -> error is gone. Sp while I can't prove what you suggested was the case, it looks likely.

Thanks again!
 
Back
Top