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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:53:19+00:00 2026-05-11T06:53:19+00:00

My goal is to create a composite control that looks like, acts like and

  • 0

My goal is to create a composite control that looks like, acts like and behaves like a RadioButtonList. There is some extra things done behind the scenes which are working no problem. What I am unable to accomplish is the desired markup to use the control. My ideal markup looks like this:

<cc1:RadioButtonField ID='rfCardType' runat='server' Title='Card Type:'>     <asp:ListItem Enabled='true' Text='MasterCard' />     <asp:ListItem Enabled='true' Text='Visa' />     <asp:ListItem Enabled='true' Text='Amex' /> </cc1:RadioButtonField> 

What I would like to do is pass the <asp:ListItems> to the RadioButtonList in the composite control and have that handle everything required to produce/run the control.

Control Markup for RadioButtonField:

<div class='Title'>      <asp:Label ID='lblTitle' runat='server' AssociatedControlID='rblField' /> </div> <div class='Text'>     <asp:RadioButtonList ID='rblField' runat='server' Visible='true'>     </asp:RadioButtonList> </div> 

Code Behind for RadioButtonField:

??? 

What does the RadioButtonField code behind need to do in order to collect the <asp:ListItems> and pass them to the RadioButtonList?

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T06:53:20+00:00Added an answer on May 11, 2026 at 6:53 am

    If you want the <ListItem> style markup, here’s what you’ll have to do:

    1. Add an items private field of type ListItemCollection to your composite control
    2. Add an Items public property of type ListItemCollection to your composite control. The getter should refer to the items private field.
    3. Add the ParseChildren class attribute to your composite control so it will read the list.

    Your composite control now has the ability to read ListItem nodes from its markup. When the control renders, all <ListItem> nodes will be added to the private items collection.

    It would be wonderful if you could now just set the Items member of the RadioButtonList, but unfortunately it is private. You will have to foreach through the items field and call the Add() method on your child RadioButtonList.

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

Sidebar

Related Questions

The goal is to create a mock class which behaves like a db resultset.
I'd like to create a custom control in javascript. The goal is to create
My goal is to create a custom TextBlock control that has a new dependency
My goal is to create an entry form (addnew.php) that will allow me to
My goal is to create something like 1Up.com has where website viewers gain Experience
Goal: create webservice that will query database and return rows, then pass it to
My goal is to create a Web Service client that runs in a standalone
My goal is to create a reusable Attached Behavior for a FlowDocumentScrollViewer, so that
My goal is to present a jsf page that has Create, Retrieve and Update
My goal is to create a curved arrow like this one, on an html5

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.