Apr 06, 2009, 4:58 AM
Create new controls in AjaxMethod
Is there a way to create new controls within an AjaxMethod, and add these to a FormPanel? E.g.
protected void btnNewField_Click(object sender, AjaxEventArgs e)
{
Anchor opAnchor = new Anchor();
TextArea opTextArea = new TextArea();
opTextArea.FieldLabel = "Testing";
opAnchor.Items.Add(opTextArea);
frmDetails.Anchors.Add(opAnchor);
cboGroup.Value = 1;
}
At the moment, the above method generates the following code on the client-side:{script:"Coolite.Ext.setValues([[cboGroup,1]]);"}