Current Version: 2016-04-10
Need a hand? Join the community.

Error: ... does not extend class 'System.Web.UI.UserControl'

This thread is closed to new posts. You must sign in to post in the forums.
4/11/2010 2:09:49 PM
Total Posts 2

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?



4/13/2010 8:03:27 AM
Total Posts 18447

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,


You must sign in to post in the forums. This thread is closed to new posts.

mojoPortal Hosting Made Easy

Monetize Your Site With Site Membership Pro!

Go Mobile with mojoPortal and Mobile Kit Pro!