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

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. I also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/11/2010 1: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 7:03:27 AM
Total Posts 18445

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.