Tuesday, July 22, 2008

Dynamically showing the TextBox in C#

Its a manual TextBox showing accordingly the requirements.

string[] s1 ={ "TextBox4", "TextBox3","TextBox1" };

TextBox[] _TxtLoop = new TextBox[2];
for (int i = 0;i<_TxtLoop.Length; i++)
{
for(int ii=0;ii {

string t1 =s1[ii].ToString();
TextBox txt=(TextBox)FindControl(t1);
txt.Visible=true;

}


}