ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class
16 comments Posted by Larry Bargers at 8:49 AMIn asp.net simply changing the attribute "codefile" to "codebehind" should do the trick.
Change:
Control language = "VB" Inherits="Bold.Modules.SupportCase.ViewSupportCases" Codefile="ViewSupportCases.ascx.vb" AutoEventWireup="false" Explicit="True"
To:
Control language = "VB" Inherits="Bold.Modules.SupportCase.ViewSupportCases" Codebehind="ViewSupportCases.ascx.vb" AutoEventWireup="false" Explicit="True"
CodeBehind
Specifies the name of the compiled file that contains the class associated with the page. This attribute is not used at run time.
This attribute is included for compatibility with previous versions of ASP.NET, to implement the code-behind feature. In ASP.NET version 2.0, you should instead use the CodeFile attribute to specify the name of the source file, along with the Inherits attribute to specify the fully qualified name of the class.
CodeFile
Specifies a path to the referenced code-behind file for the page. This attribute is used together with the Inherits attribute to associate a code-behind source file with a Web page. The attribute is valid only for compiled pages.
Labels: asp.net, aspx, DotNetNuke, vb.net