protected void ShowLinkButtonControls(Control control) { List <LinkButton> listLinkButton = BaseHelper.GetAllControlsRecusrvive <LinkButton>(control).ToList(); //listLinkButton.ForEach(s => s.Visible = false); //listLinkButton.Where(s => s.ID != null && !s.ID.Contains("lbtnOpenDirectory")).ToList().ForEach(s => s.Visible = false); listLinkButton.Where(s => s.ID == null).ToList().ForEach(s => s.Enabled = true); listLinkButton.Where(s => s.ID != null).ToList().ForEach(s => s.Visible = true); listLinkButton.Where(s => s.ID != null && s.ID.Contains("lbtnOpenDirectory")).ToList().ForEach(s => s.Visible = true); }
protected void HideButtonControls(Control control, List <string> listExceptionIDs) { List <Button> listButton = BaseHelper.GetAllControlsRecusrvive <Button>(control).ToList(); if (listExceptionIDs != null) { listButton.Where(w => w.ID == null || (w.ID != null && !listExceptionIDs.Contains(w.ID))).ToList().ForEach(s => s.Visible = false); } else { listButton.ForEach(s => s.Visible = false); } }
protected void EnableDropDownListControls(Control control) { List <DropDownList> list = BaseHelper.GetAllControlsRecusrvive <DropDownList>(control).ToList(); list.ForEach(s => s.Enabled = true); }
protected void EnableTextBoxControls(Control control) { List <TextBox> listTextBox = BaseHelper.GetAllControlsRecusrvive <TextBox>(control).ToList(); listTextBox.ForEach(s => s.Enabled = true); }
protected void ShowButtonControls(Control control) { List <Button> listButton = BaseHelper.GetAllControlsRecusrvive <Button>(control).ToList(); listButton.ForEach(s => s.Visible = true); }