Now I have a big problem,
As I have created only one object for the textbox and that particular textbox is being repeated as many times I want But if I want to add the values in the database from each and every textbox which have been dynamically created how should I do that?
Let me explain with my real time scenario , For example if customer-1 has 2 telephone lines and customer-3 has 3 telephone lines then the textbox ate displayed as required but how to add these values to DB from dynamically created textboxes?
thanx in advance
When you create the TextBox, you should populate it's value from the database
Get the phone lines from the database.
Loop through the phone lines, and for each phone line create a text box.
As you're looping through the phone lines,set the TextBox's Text value to the phone line. Then add the TextBox to the web page (I'm assuming that you are adding it to the Panel control).
-Frinny