The way I do it is to dynamically write a bunch of HTML to a string, then
set the Text value of a label on the page to be that string. It's simple
but effective.
public void AddTextBoxes( int number ){
for( int i = 0; i < number; i++ ){
string name = "txtBox_" + ( i + 1 ).ToString( "00" );
TextBox txt = new TextBox();
txt.Name = name;
// Set other properties such as size and location and TabIndex if
you wish.
this.Controls.Add( txt );
}
}
-akshay
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.