How do I add a control to the WebDialogWindow through code?

[Infragistics] Tony Lombardo / Saturday, February 28, 2009

You can add controls dynamically to the WebDialogWindow by adding to the ContentPane.Controls collection.

//Create a textbox
TextBox tb = new TextBox();
tb.ID = "tb1";
tb.Text = "text";

//Add the textbox to the DialogWindow's ContentPane Control's collection
this.WebDialogWindow1.ContentPane.Controls.Add(tb);