J
Jonathan Tower
I created a template class that inherits from the System.Web.UI.Page
class. The template class overrides the Render method and adds simple
HTML to the beginning and end of the page. I've then inherited the
template class in the codebehinds of my pages. This worked fine until
I moved the template class into a separate assembly. Now I'm getting
the following error on the page directive line of my aspx file:
Parser Error
Description: An error occurred during the parsing of a resource
required to service this request. Please review the following specific
parse error details and modify your source file appropriately.
Parser Error Message: Could not load type
'WebApplicationName.PageClassName'.
Here's the code:
--Tempate.vb-------------------------------------
Public Class Template
Inherits System.Web.UI.Page
Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
writer.Write("<HTML>")
MyBase.Render(writer)
writer.Write("</HTML>")
End Sub
End Class
--PageClassName.aspx---------------------------------
Public Class PageClassName
Inherits Template
....
End Class
--PageClassName.aspx.vb---------------------------------
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="PageClassName.aspx.vb"
Inherits="WebApplicationName.PageClassName"%>
....
The only difference between when it was working and not working is
that I moved the Template class into a separate assembly. Other
classes in the separate assembly are working fine. Any help would be
appreciated.
class. The template class overrides the Render method and adds simple
HTML to the beginning and end of the page. I've then inherited the
template class in the codebehinds of my pages. This worked fine until
I moved the template class into a separate assembly. Now I'm getting
the following error on the page directive line of my aspx file:
Parser Error
Description: An error occurred during the parsing of a resource
required to service this request. Please review the following specific
parse error details and modify your source file appropriately.
Parser Error Message: Could not load type
'WebApplicationName.PageClassName'.
Here's the code:
--Tempate.vb-------------------------------------
Public Class Template
Inherits System.Web.UI.Page
Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
writer.Write("<HTML>")
MyBase.Render(writer)
writer.Write("</HTML>")
End Sub
End Class
--PageClassName.aspx---------------------------------
Public Class PageClassName
Inherits Template
....
End Class
--PageClassName.aspx.vb---------------------------------
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="PageClassName.aspx.vb"
Inherits="WebApplicationName.PageClassName"%>
....
The only difference between when it was working and not working is
that I moved the Template class into a separate assembly. Other
classes in the separate assembly are working fine. Any help would be
appreciated.