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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:37:14+00:00 2026-06-13T10:37:14+00:00

the scenario is like so : say i have a table , html table

  • 0

the scenario is like so :

say i have a table , html table , the table has few <td> Controls each has a set of controls,

that is related to that specific <td> , but not necessarily enclosed within the <td> scope.

for example :

<asp:Label ID="Lbl_TlTp1" runat="server">

<table>
    <tr>
        <td ID="TD_1" runat="server">
            <asp:Label ID="LBL_1" runat="server" />
        </td>
        <td>
            <asp:TextBox ID="TBX_1" runat="server" /> 
        </td>
    </tr>
</table>

now i want to be able to address tips Label Lbl_TlTp1, DataLabel LBL_1 And the TextBox TBX_1

as A set or a collection, to be very flexible (allowing Enumeration etc’..)

is it by making it(that “set” ) as a class or object that encapsulates those control items… each as a member ?

i would like to later be able to manipulate the “set” as one entity

setOfControls Sct1 = new setOfControls()

public void ActAppon(setOfControls section)
{
    execProcedure1(section);

    foreach(control ctr in section)
    {
        doTheThing(ctr);
    }
}
    ...etc'

what is the approach to achieve this solution ?

  • 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-06-13T10:37:15+00:00Added an answer on June 13, 2026 at 10:37 am

    Make a UserControl (.ascx) for the markup, and expose the properties for your web-controls, and work on that..

    Make a UserControl (.ascx) named as ControlGroup.ascx

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ControlGroup.ascx.cs" Inherits="NameSpaceName.ProjectName.ControlGroup" %>
    <asp:Label ID="Lbl_TlTp1" runat="server">
    
    <table>
        <tr>
            <td ID="TD_1" runat="server">
                <asp:Label ID="LBL_1" runat="server" />
            </td>
            <td>
                <asp:TextBox ID="TBX_1" runat="server" /> 
            </td>
        </tr>
    </table>
    

    In its code behind (ControlGroup.ascx.cs) make Properties. like

    namespace NameSpaceName.ProjectName
    {
        public partial class ControlGroup: System.Web.UI.UserControl
        {
            protected void Page_Load(object sender, EventArgs e)
            { }
    
            public Label T1Tp1 { get { return Lbl_TlTp1; }}
            public Label LBL { get { return Lbl_TlTp1; }}
            public TextBox TBX{ get { return Lbl_TlTp1; }}
        }
    }
    

    And Now you can use this UserControl In any ASPX Page.
    For it register your usercontrol on a page like

    <%@ Page ....... %>
    <%@ Register TagPrefix="uc1" TagName="CG" Src="ControlGroup.ascx" %>
    

    And Use this Control in markup like

    <uc1:CG runat="server" id="cg1" />
    

    And In Page load of the page you can access this control and its property. like

    protected void Page_Load(object sender, EventArgs e)
    {
        cg1.T1Tp1.Text = "Some Text";
        cg1.LBL.Text = "Some Lable Text";
        cg1.TBX.Text = "Some TextBox Text";
    }
    

    Or you can load your usercontrol programatic. like

    List<ControlGroup> setOfControls = new List<ControlGroup>();
    
    for(int i=0; i<10 ;i++)
    {
       ControlGroup cg1 = Page.LoadControl("~/ControlGroup.ascx") as ControlGroup;
       if(cg1 != null)
       {
         cg1.T1Tp1.Text = "";
         cg1.LBL.Text = "";
         cg1.TBX.Text = "";
    
         setOfControls.Add(cg1);
       }
    }
    

    and can add it in another control, on even populate a list for these controls.

    I hope It will help you.

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

Sidebar

Related Questions

Scenario: We have 5 users. (users table) Each user has up to 10 imgs.
Here's my scenario: I have a simple stored procedure that removes a specific set
Scenario 1 I have one table lets say member. In that table member i
Let say that I have table TableA(ColumnCode, ColumnA2, ColumnA3, ColumnA4, ColumnA5). Note: ColumnCode(PrimaryKey)is not
I have this strange scenario. I have a table having multiple rows (each generated
If I have this table TableABC and it has some fields/columns, rather say it
I have the classic scenario with 2 tables and a junction table. Let's say,
Let's say that I have a table called Appointments, another called Clients and a
Here is my scenario. I have a container div that has (n) child elements
I have a scenario like this: I need to pass @id to the stored

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.