private void InitializeFields() { for (var index = ParentControl.Controls.Count - 1; index >= 0; --index) { var control = ParentControl.Controls[index]; if (!string.IsNullOrEmpty(control.ID) && (control.ID.StartsWith("Field") || control.ID.StartsWith("Property") || control.ID.StartsWith("DelSection"))) { ParentControl.Controls.Remove(control); } } InitializeUserNameField(); InitializeContactFields(); var prevIdPostfix = string.Empty; foreach (var str in FieldList) { var f = str; var defProperty = PropertyList.Find(p => string.Equals(f, p, StringComparison.OrdinalIgnoreCase)); if (!string.IsNullOrEmpty(defProperty)) { prevIdPostfix = AddRow(prevIdPostfix, defProperty); } } AddRow(prevIdPostfix); SheerResponse.Refresh(FieldsSection); }