accessing a textbox that was created dynamically?


for (int i = 0; i < t1; i++)
{
TextBox t2 = new TextBox();
t2.ID = "adf" + i;
PlaceHolder1.Controls.Add(t2);
}



accessing data entered in the above created controls.



accessing a textbox that was created dynamically? for (int i = 0; i < t1; i++) ..

Answer / joy ghosh

for (int i = 0; i < t1; i++)
{
TextBox t2 =(TextBox) PlaceHolder1.FindControl("adf" + i);
string str=t2.Text;
}

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

How to make sure that contents of an updatepanel update only when a partial postback takes place (and not on a full postback)?

0 Answers  


what is view state

5 Answers   Microsoft, Siebel Systems,


Should user input data validation occur server-side or client-side? Why?

3 Answers   NIC, Siebel Systems,


What is the difference between a Stored procedure and function?

9 Answers  


Can you explain one critical mapping? Performance issue which one is better?

0 Answers  






What is postback request?

0 Answers  


How many types of server controls do we have?Also explain differance between them taking an example of ASP.NET?

0 Answers  


Explain login control and form authentication.

0 Answers  


To display data in the combo box, prior to setting the Data Source, what kind of property on a Combo Box do you set with a column name?

0 Answers   Siebel,


Why would a company use an application service provider?

0 Answers  


what are the events in ASP.net page life cycle?

1 Answers  


What are sessions used for?

0 Answers  


Categories