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

What are directives in asp.net? List down all the important directives.

0 Answers  


Is There any Third party tools are using in .Net Technologies? Can u Explain?

4 Answers   HCL,


How do you construct HtmlResponseMessage?

1 Answers  


Which is better viewstate or session?

0 Answers  


Can any body provide me the sample web application in asp.net

0 Answers  






Can private assembly be used for more than one application? If so how?

7 Answers   Satyam,


If you have to replicate a set of controls(UI) across a number of web pages, what will you do

1 Answers  


What is Difference between Callbacks and Postback in ASP.NET?

11 Answers  


What is data reader in asp.net?

0 Answers  


What is the importance of aspnet_isapi.dll, inetinfo.exe andaspnet_wp.exe in the page loading process.

0 Answers   Siebel,


What is application state?

0 Answers  


What is the roll of JIT in asp.net?

7 Answers  


Categories