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

  • Home
  • SEARCH
  • 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 919715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:35:28+00:00 2026-05-15T18:35:28+00:00

How dan I dynamically create some public properties on a custom webcontrol. For example,

  • 0

How dan I dynamically create some public properties on a custom webcontrol.

For example, web control has 5 TextBox controls. I need a public property for each TextBox control to be able to set a specific property of the TextBox control.

I want to be able to loop the controls in the webcontrol and create a public property for each TextBox control.

any ideas?

  • 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-15T18:35:29+00:00Added an answer on May 15, 2026 at 6:35 pm

    Edited:

    If the child-controls are present at Design-Time then you need to explain why you want to dynamically add properties to access the control members–unless there is a good reason it just sounds like a poor design.

    Here’s my suggestion:

    • Leave your controls as Friend or Private — don’t expose them directly (it leads to tight-coupling and gets nasty over time).

    • Expose a new public property that gets/sets the corresponding property on 1x of your controls; so if you want to set .Text on 5x TextBoxes you’ll have 5x properties.

    • Be done with it.

    If you’re trying to be clever by dynamically adding them, then it’s a good intention that will lead to poor results. Just remember: KISS (Keep it simple, stupid!).

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

Sidebar

Related Questions

Say for example I have an object of var user = { Name: Dan,
I have an attribute: <names>Dan,John,Matin,Lewis</names> Can you create a filter [names='Dan'] and get the
for example: [ (id=>1, email=>'tim@tim.com', name=>'tim'), (id=>2, email=>'joe@joe.com', name=>'joe'), (id=>3, email=>'dan@dan.com', name=>'dan') ] How
I'm using Jquery UI 1./Dan Wellman/Packt Publishing to learn JQuery UI. I'm working on
If I own a domain name like e.g Dan-Carlos.com Does the andoid package name
I have taken over a project that was build from suggestions in this Dan
Userid FirstName LastName UserUpdate 1 Dan Kramer 1/1/2005 1 Dan Kramer 1/1/2007 1 Dan
Given this data on SQL Server 2005: SectionID Name 1 Dan 2 Dan 4
I have two tables: Table A: id name ------------ 1 Scott 2 Dan 3
I have the following table: Table: UserName Userid User UserUpdate 1 Dan 1/1/2005 1

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.