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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:57:26+00:00 2026-05-23T15:57:26+00:00

I am using Telerik ASP.Net Ajax controls (theoretically shouldn’t matter who makes the 3rd

  • 0

I am using Telerik ASP.Net Ajax controls (theoretically shouldn’t matter who makes the 3rd party control). I would like to create my own custom server control (not user control) that has my own predefined HTML output but also includes a Telerik DatePicker. Since the Telerik DatePicker is another server control what is the correct procedure to place a server control into my custom server control.

My understanding is that server controls work by writing html output. How can I write the output of another control that I instantiate in the Render method and still retain the original controls individual lifecycle.

Desired outcome:

  • My own custom server control that contains many 3rd party controls (ie. RadDatePicker).

Solution

Thanks to @Sumo for pointing me into the direction of the Composite control. Documentation is available here.

I was able to solve the issue by creating a control that inherits CompositeDataBoundControl. Then databinding my datasource, calculating how many custom controls needed, placing them into an ArrayList and instantiating them correctly (with their own lifecycle in CreateChildControls()). I was then able to render each control in the ArrayList of DatePicker in the Render() method by invoking the ArrayList index that has not been rendered yet.
Eg. ((RadDatePicker)datePickerArray(instantiatedDatePickersCount)).RenderControl(writer).

Its a dirty solution at the moment but It works for my testing purposes.

  • 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-23T15:57:26+00:00Added an answer on May 23, 2026 at 3:57 pm

    You’ll want to create a CompositeControl. This allows you to easily add HTML markup and controls using an override of CreateChildControls and not have to think about too much else.

    Some sample code:

    using System.ComponentModel;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    
    namespace TestServerControls {
        [DefaultProperty("Text")]
        [ToolboxData("<{0}:GridWithHeader runat=server></{0}:GridWithHeader>")]
        public class GridWithHeader : CompositeControl {
            private readonly GridView _grid = new GridView();
            private readonly HtmlGenericControl _header = new HtmlGenericControl("h1");
    
            public string Text {
                get { return _header.InnerHtml; }
                set { _header.InnerHtml = value; }
            }
    
            protected override void CreateChildControls() {
                Controls.Add(_header);
                Controls.Add(_grid);
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're using the Telerik Rad Controls for ASP.Net Ajax on an ASP.Net MVC project.
I am now starting to use Telerik's ASP.NET AJAX controls for 2009 Q1 on
I am using Telerik controls in an ASP.NET Website. It takes time while sending
I'm using telerik ASP.Net Ajax grid component, and I'm facing a problem. If I'm
I am using Telerik controls in an ASP.Net application for invoice entry. I'm looking
I have develop small Asp.net MVC3 application using Telerik rad Controls with in that
I'm using the Telerik RAD Controls RADEditor/WYSIWYG control as part of a Dynamic Data
I am looking people's opinion and experience on using chart controls within an ASP.NET
Greetings Everyone I am new in asp.net and i'm using RadControls for Asp.net Ajax
I am Developing a web application by using ASP.NET 3.5, jQuery and RadAjax Telerik

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.