Hi All,
Anybody who can tell me why I cant add textbox to List?
private List
public void AddInputBox(String data,String inputTxt)
{
this.inputDataList.Add(data);
TextBox txtBx = new TextBox();
txtBx.Height = 20;
txtBx.Width = 50;
txtBx.ReadOnly = true;
int number = this.inputList.Count;
txtBx.Location = new Point(number * 55, 20);
txtBx.Text = inputTxt;
//Add txtBox to inputList
this.inputList.Add(txtBx); ----> here I get error "some invalide arguments"
this.Controls.Add(txtBx);
Thanx to All

Sunny SharmaPosted Aug 10, 2013, 2:15 AM
Since you have a list of string type: List
this.inputList.Add(txtBx);
You can do so:
this.inputList.Add(txtBx.Text);
Hope you got the point.
Happy Coding :)
Sunny SharmaPosted Aug 10, 2013, 2:37 AM
ilhami caliskanPosted Aug 10, 2013, 2:27 AM
the code should be
private List
sometimes we are just blind with open eyes... :P