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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:19:06+00:00 2026-05-10T15:19:06+00:00

I have several user controls, let’s say A , B , C and D

  • 0

I have several user controls, let’s say A, B, C and D. Based on some random input, I need to generate a combination of these. For e.g. if input is 2a3d1a2c I need to show two of the A’s, 3 D’s after that, an A again, etc.

I will also need to stabilize clientid’s in order for them to work correctly. Because each of these controls use their own ClientID property to gather the inputs on themselves. For e.g. user control A internally generates an input named this.ClientID + '$input1', and gathers its input from request like Request[this.ClientID + '$input1']. Since there can be more than one A, each A needs to have the same (unique) ClientID after postback in order to get correct inputs from request.

  • 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-10T15:19:07+00:00Added an answer on May 10, 2026 at 3:19 pm

    To add controls dynamically, you can use a panel as a place holder, say

    <asp:Panel ID='ControlPlaceholder' runat='server' /> 

    Then, on the server side, you can add objects to it like so:

    int controlCount = 0;  ...  TextBox newTextBox = TextBox(); newTextBox.ID = 'ctl_' + controlCount++; ControlPlaceholder.Controls.Add(newTextBox); 

    If you add the controls to it during your Page_Load event and use a consistent method of generating the controls’ IDs (such as a the simple count above) then any viewstate or event bindings will be re-bound to the right object on a postback.

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

Sidebar

Ask A Question

Stats

  • Questions 294k
  • Answers 295k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I manage a project that works very similar to what… May 13, 2026 at 6:46 pm
  • Editorial Team
    Editorial Team added an answer The example you are pointing to is, indeed, for Spring… May 13, 2026 at 6:46 pm
  • Editorial Team
    Editorial Team added an answer It does not ignore the time portion. Check your data-… May 13, 2026 at 6:46 pm

Related Questions

I have several user controls, let's say A , B , C and D
I have several winforms listbox controls I am hosting in a user control. The
I know how to create a custom user control in WPF but how can
I'm looking for patterns that concern coding parts of a GUI. Not as global
First off, I read all of the suggested questions that sounded halfway relevant and

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.