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 5837867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:24:26+00:00 2026-05-22T11:24:26+00:00

VS2010, .Net 4.0 In trying to extend the asp.net BoundField server control, as described

  • 0

VS2010, .Net 4.0

In trying to extend the asp.net BoundField server control, as described here:
http://iridescence.no/post/FixingBoundFieldSupportforCompositeObjects.aspx

I have created a class:

using System.Web.UI;
using System.Web.UI.WebControls;

namespace CustomControls
{ 
    public class CompositeBoundField : BoundField
    {
        protected override object GetValue(Control controlContainer)
        {
            object item = DataBinder.GetDataItem(controlContainer);
            return DataBinder.Eval(item, this.DataField);
        }
    }
}

I’ve registered it from my page:

<%@ Register TagPrefix="cc" Namespace="CustomControls" %>

…and on that page, I am attempting to use it like so:

<asp:GridView ID="gridDataSource" runat="server">
    <Columns>
        <cc:CompositeBoundField DataField="Application.ApplicationName" HeaderText="ApplicationName" />
    </Columns>
    </asp:GridView>

However, I am getting a compiler warning:

Element 'CompositeBoundField' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.    

And when I run, I get the error:

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: Unknown server tag 'cc:CompositeBoundField'.

Any ideas what I’m doing wrong?

I tried this:
http://blog.tentaclesoftware.com/archive/2010/07/21/95.aspx

  • 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-22T11:24:26+00:00Added an answer on May 22, 2026 at 11:24 am

    In the Register declaration, the Assembly is mandatory:

    <%@ Register Namespace="CustomControls" TagPrefix="cc" Assembly="MyCompany.MyApp.WebApp" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently trying to create a custom server control in asp.net c# and
I'm trying to deploy an ASP.NET MVC 2 app using MsDeploy. I use VS2010
I'm trying to send email to my site users (ASP.NET, VS2010), currently I'm using
I'm trying the code sample (for ASP NET C#, for VS2010) from this page:
I am getting an error when trying to move my ASP.NET application from VS2010
I have a ASP.NET MVC2 project in VS2010 that can be deployed in two
I'm trying to make Avalon work with WPF Ribbon on VS2010 .NET 4, but
I'm working on a web-based academical evaluation project (VS2010,C#,ASP.NET). Users can enter the web
I am trying to get Subsonic(3.0.0.4) to work(.Net 3.5 - VS2010), simple install that
I'm trying to write a simple website (ASP.NET v4), which will call Windows Search,

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.