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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:46:11+00:00 2026-05-27T05:46:11+00:00

I am struggling with the below from last two days.Please help me. I have

  • 0

I am struggling with the below from last two days.Please help me.

I have .aspx page like this

<div>
<asp:PlaceHolder ID="pchStep4Adult" runat="server"></asp:PlaceHolder/>
<asp:button runt="server" text="next" onserverclick="ProceedNext"/>
</div>

then i have .aspx.cs code like this:

here i have a dynamic text box here and i want the text in that text box.
text boxes will be added dynamically and No of text boxes will change dynamically. Any no of Text boxes are created.

public partial class pages_travelersDetail : System.Web.UI.Page
{
   protected void Page_Load(object sender, EventArgs e)
   {                       
      TextBox tb= new TextBox();
      tb.ID = "tb" + i;   
      pchStep4Adult.Controls.Add(tb);           
   } 
}

//Here i want the text box value in a string.
protected void ProceedNext(object sender, EventArgs e)
{
   //Here i want the text box value in a string.
}

Please help me. Thanks in advance.

  • 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-27T05:46:12+00:00Added an answer on May 27, 2026 at 5:46 am

    If it’s only one TextBox:

    TextBox tb = (TextBox)pchStep4Adult.FindControl("tb1");
    

    If your example was simplified and you actually have multiple TextBoxes, you could loop the PlaceHolder’s ControlCollection to get all TextBoxes.

    foreach (Control ctrl in pchStep4Adult.Controls){
        TextBox txt = (TextBox)ctrl;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For the last couple of days, I have been struggling with integrating Urban Airship
Apologies for the essay-like nature of this question. I have been struggling to get
Please explain the SQL query given below. I m new with SQL and struggling
Im struggling with this one. I have a list of items and on a
I've been struggling with this error for several days with little headway. Basically, I'm
I am struggling with the configuration for the scenario below. I have a custom
I have the following in linq-to-entities clientprojects = (from p in this.SAPMappingEntities.SAP_Master_Projects join c
Following on from this question , I am still struggling with the Twitter Bootstrap.
--- Edited below with some more testing, please read :) --- I'm struggling trying
I'm struggling to get some var'ed values into jquery selector. // this works below

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.