G
Guest
Anybody quickly replies it, would be a great help!
I try to create dynamic array of textboxes control in ASP.NET(C#). I got the
following error while I tried to assign value to ID property of dynamically
created textbox. (look at my code please )
Error: “ Object reference is not set to an instance of Objectâ€
totalRows – int variable which varies with number of records in SQL table
Textbox[]txbox = new Textbox [totalRows];
For (int i=0; i < totalRows; i++)
{
txbox.ID = “myTextboxâ€; //Getting error here
}
Thanks,
I try to create dynamic array of textboxes control in ASP.NET(C#). I got the
following error while I tried to assign value to ID property of dynamically
created textbox. (look at my code please )
Error: “ Object reference is not set to an instance of Objectâ€
totalRows – int variable which varies with number of records in SQL table
Textbox[]txbox = new Textbox [totalRows];
For (int i=0; i < totalRows; i++)
{
txbox.ID = “myTextboxâ€; //Getting error here
}
Thanks,