Hi,
I have the following function:
Code:
private void PrintControls(ControlCollection ctrls)
{
foreach (Control c in ctrls)
{
if (c is TextBox)
{
TextBox tb = (TextBox)c;
mail += (tb.ID + ": " + tb.Text + "\n");
}
else if (c is DropDownList)
{
DropDownList tb = (DropDownList)c;
mail += (tb.ID + ": " + tb.SelectedValue + "\n");
}
else if (c is RadioButtonList)
{
RadioButtonList tb = (RadioButtonList)c;
mail += (tb.ID + ": " + tb.SelectedValue + "\n");
}
else if (c is CheckBox)
{
CheckBox tb = (CheckBox)c;
mail += (tb.ID + ": " + (tb.Checked ? "True" : "False") + "\n");
}
}
}
And this is how I'm using it
Code:
mail += "\n--------Policy Holder--------" + "\n\n";
PrintControls(PolicyHolderControl1.Controls);
However, I cannot get it to send any contents from anything inside an UpdatePanel.
What do I need to do?