Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6364339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:09:04+00:00 2026-05-25T00:09:04+00:00

I have a CompositeDataBoundControl defined as below: <%@ Control Language=C# AutoEventWireup=true CodeBehind=ReportSection.ascx.cs Inherits=WebReports.ReportSection %>

  • 0

I have a CompositeDataBoundControl defined as below:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ReportSection.ascx.cs" Inherits="WebReports.ReportSection" %>
<div class="report-section span-24">
    <h3>
        <%= Title %></h3>
</div>

public partial class ReportSection : CompositeDataBoundControl
{
    public string Title { get; set; }
    protected override int CreateChildControls(IEnumerable dataSource, bool dataBinding)
    {
        //throw new NotImplementedException();
        return 1; // JUst something to avoid exceptions.
    }
}

Yet when I try and load a web form containing this control, I get the following parser error:

‘WebReports.ReportSection’ is not allowed here because it does not extend class ‘System.Web.UI.UserControl’.

This seems very odd to me, because I get the impression that CompositeDataBoundControl is intended as a base class for user controls, or is it perhaps only for use with server controls?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:09:04+00:00Added an answer on May 25, 2026 at 12:09 am

    It is intended for server controls, not UserControls. UserControls are more similar to Pages than to other controls (both inherit from TemplatedControl).

    You can see from the MSDN description for CompositeDataBoundControl that it’s not really intended for user controls:

    Represents the base class for a tabular data-bound control that is
    composed of other server controls.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom class: SimpleTemplatedControl : CompositeDataBoundControl private ITemplate _itemTemplate; [PersistenceMode(PersistenceMode.InnerProperty), TemplateContainer(typeof(SimpleItem)), ]
I have a CompositeDataBoundControl and im trying to add a ItemCommand to it, ala
I have written a Custom Control that contains the following: [assembly: System.Web.UI.WebResource(InSysControls.AssignmentLists.AssignmentLists.js, text/javascript)] namespace
I have a compositeDatabound control: MyGrid with MyItemTemplate with container of MyContainer. I have
have the following text file: <div> <asp:HyperLinkField HeaderText=Hello World of Regular Expression /> </div>
have next code: class GameTexture { private: LPDIRECT3DTEXTURE9 texture; unsigned char *alphaLayer; UINT width,
Have following setup: MainActivity class - extends activity MyLayout class - extends View Prefs
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you guys had any experiences (positive or negative) by placing your source code/solution

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.