or
protected void FilterData(object sender, EventArgs e)
{
LoopThruFilterControls(rfPortfolios.Controls);
rfPortfolios.FireApplyCommand();
} private void LoopThruFilterControls(ControlCollection cc)
{
for (int i = 0; i < cc.Count; i++)
{
string controlType = cc[i].GetType().Name;
if(controlType.Equals("TextBox", StringComparison.CurrentCultureIgnoreCase))
{
TextBox tmp = (TextBox)cc[i];
((TextBox)cc[i]).Text = tmp.Text.Trim();
}
LoopThruFilterControls(cc[i].Controls);
}
}<asp:UpdatePanel ID="UpdatePanel_System" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true" EnableViewState="True"> <div> <telerik:RadButton ID="displaySystemAnnouncementsCB" runat="server" Text="Display system announcements to all users at the top of the page" ToggleType="CheckBox" OnCheckedChanged="displaySystemAnnouncementsCBCB" ButtonType="ToggleButton"> </telerik:RadButton> </div></asp:UpdatePanel>protected void displaySystemAnnouncementsCBCB(object sender, EventArgs e){ RadButton rb = (RadButton)sender; if (rb.Checked) { configuration.AppSettings.Settings["displaySystemAnnouncements"].Value = "1"; } else { configuration.AppSettings.Settings["displaySystemAnnouncements"].Value = "0"; } configuration.Save();}