I am endeavouring to correct a problem with a Web Project:-
Could not load type 'MyProg._Default'.
To fix this I have adopted the solution suggested here and changed CodeBehind
into CodeFile
. As is customary in ASP.Net Whack-a-Mole, this has introduced a new and different error:-
Context is not a member of 'MyProg._Default'
The very strange solution to this suggested here doesn't seem likely to fix the problem as I have no user-defined controls on the form.
I have two questions, really. First, is changing CodeBehind
this way likely to fix the original problem, and if so how do I fix the new problem?
Edit to answer wazz's question, the top line in the aspx is:-
<%@ Language="VB"
AutoEventWireup="true"
Inherits="MyProg._Default"
CodeFile="Default.aspx.vb"
MaintainScrollPositionOnPostback="true" %>
and the class is defined thus:-
Public Class _Default
Inherits System.Web.UI.Page