i want to create an array of text boxes in form like column or in any way, and the number of textboxes determined in the run time when the form is loaded and put in them values getten from the database ,and i want to read these values again from the all textboxes if i want to update these values of change there values
am using visual studio2010 and c# language
how can i do all of that !!!
Loading
Jignesh TrivediPosted Jul 2, 2012, 11:47 PM
If you use Asp.net then you can use Page.Controls in which is collection of all control of page. then you can find text from this collection.
foreach (Control c in Page.Controls)
{
foreach (Control childc in c.Controls)
{
if (childc is TextBox)
{
// This is Textbox do your code
}
}
}
If you have limited number of text box then you can also use FindControl method.
hope this will help you.