Nov 25, 2009, 11:58 PM
Create controls in code behind
Hi,
I want to create some controls in code behind like this :
I want to create some controls in code behind like this :
[Cool.AjaxMethod]
public void AddEMail()
{Coolite.Ext.Web.ComboBox cb = new Coolite.Ext.Web.ComboBox();
cb.ID = "cbx1";
cb.FieldLabel = "Type";
cb.Editable = false;
cb.ForceSelection = true;
Cool.Anchor an = new Coolite.Ext.Web.Anchor();
an.Horizontal = "100%";
an.Items.Add(cb);
Cool.FormLayout fl = new Coolite.Ext.Web.FormLayout();
fl.LabelWidth = 150;
fl.Anchors.Add(an);
pnlMailContent.BodyContainer.Controls.Add(fl);
the "pnlMailContent" already exists in the webform.