for(int k=1;k<=f;k++)
{
textbox+k+.text=file[k]
}
here it is not correct way to concatenate textbox and integer
How to add integer to textbox name in for loop
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Mar 19, 2015, 4:25 AM EDT
Jignesh TrivediRank #16 · 50.3K reputationPosted Mar 19, 2015, 5:47 AM EDT
hi,
Control collection contain all control of page using following code you may find all text box on page.
foreach (var c in this.Controls.OfType())
{
c.Text = c.Name;
}
hope this will help you.
Keertti Raj Thangavelu BabuRank #3,979 · 374 reputationPosted Mar 19, 2015, 4:06 AM EDT
May I Know in details.Are you assign a value to already created textboxs or dynamic textboxs
Khargesh RajputRank #616 · 3.9K reputationPosted Mar 19, 2015, 4:17 AM EDT