Forums >
Developer Forum
> Error: ... does not extend class 'System.Web.UI.UserControl'
Error: ... does not extend class 'System.Web.UI.UserControl'
Error: ... does not extend class 'System.Web.UI.UserControl'
I'm not sure what I'm doing wrong. This is my first time working with MojoPortal and I am trying to create a custom feature. I have gotten all the way to adding the feature to the site, but when I try to view the page I get this:
Server Error in '/' Application.
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: 'sb.PublicCards.Web.UI.PublicCardsModule' is not allowed here because it does not extend class 'System.Web.UI.UserControl'.
Source Error:
Line 1: <%@ Control Language="vb" AutoEventWireup="false" CodeBehind="PublicCards.ascx.vb" Inherits="sb.PublicCards.Web.UI.PublicCardsModule" %>
Line 2:
Line 3: <portal:mojoPanel ID="mp1" runat="server" ArtisteerCssClass="art-Post" RenderArtisteerBlockContentDivs="true">
What should I do?
Thanks!
|
Re: Error: ... does not extend class 'System.Web.UI.UserControl'
Sounds like your code behind file for your .ascx does not inherit from UserControl. It should inherit from UserControl, or more ideally from mojoPortal.Web.SiteModuleControl which itself inherits from UserControl
Hope it helps,
Joe
|