Dynamic Controls

  • Thread starter Thread starter Bijoy Naick
  • Start date Start date
B

Bijoy Naick

Need help with inserting and accessing web controls and user controls
dynamically.

How can I programatically insert webcontrols and user controls based on data
I get from a database? Also, how can I access the data within these
controls?

Bijoy
 
Let me describe what i want to achieve.. I need to execute a query like this
: SELECT FNAME FROM myTable"

Then for each record, I want to create a textbox with the fName displayed..
The number of recs in the table will vary so I cannot predefine the
textboxes.

If the user were to change the contents of the text box, I'd like to update
teh db.. So how do I access each dynamically created textbox?

Instead of the textbox, can I dynamically add a user control?

Thx.

Bijoy
 
Eliahu said:
Try to use PlaceHolder controls with Add methods.

Controls can be nested in any control. The difference is that
PlaceHolder doesn't render anything but its children.
 
Back
Top