public SUIHtmlSelect SearchHtmlSelectByID(string id, int index) { List <SUIHtmlControlBase> list = GetElementsByTagName("SELECT"); int i = 0; Regex regex = new Regex("[0-9]+"); string ctrlID = null; foreach (SUIHtmlControlBase ctrl in list) { if (SUIHtmlSelect.IsSelectElement(ctrl)) { if (ctrl.ID != null) { ctrlID = regex.Replace(ctrl.ID, "*"); } if ((ctrl.ID != null && ctrlID.Equals(id)) || (ctrl.ID == null && id == null)) { if (i == index) { SUIHtmlSelect select = new SUIHtmlSelect(ctrl); return(select); } i++; } } } return(null); }
public SUIHtmlSelect SearchHtmlSelectByID(string id, int index) { List<SUIHtmlControlBase> list = GetElementsByTagName("SELECT"); int i = 0; Regex regex = new Regex("[0-9]+"); string ctrlID = null; foreach (SUIHtmlControlBase ctrl in list) { if (SUIHtmlSelect.IsSelectElement(ctrl)) { if (ctrl.ID != null) ctrlID = regex.Replace(ctrl.ID, "*"); if ((ctrl.ID != null && ctrlID.Equals(id)) || (ctrl.ID == null && id == null)) { if (i == index) { SUIHtmlSelect select = new SUIHtmlSelect(ctrl); return select; } i++; } } } return null; }