My master page can't find its code behind class

  • Thread starter Thread starter rating maven
  • Start date Start date
R

rating maven

Guest
I created a visual basic forms project, which came with its own master pages. I renamed the master pages because I was using them in a project with other master pages. Anyway, the 'inherits' clause of the master page can't find the class.

Here are the 3 pages I have:


EchoSite.Master.vb has:

Public Class EchoSiteMaster
Inherits MasterPage
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
End Sub
End Class

EchoSite.Designer.Master.vb has

'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On

Partial Public Class EchoSiteMaster
'''<summary>
'''MainContent control.
'''</summary>
'''<remarks>
'''Auto-generated field.
'''To modify move field declaration from designer file to code-behind file.
'''</remarks>
Protected WithEvents MainContent As Global.System.Web.UI.WebControls.ContentPlaceHolder
End Class
EchoSite.master starts with the following, which causes the error, because the 'inherits' clause fails:

<%@ Master Language="VB" AutoEventWireup="true" CodeBehind="EchoSite.Master.vb" Inherits="EchoSiteMaster" %>
<!DOCTYPE html>
Any help is appreciated

Continue reading...
 
Back
Top