示例#1
0
        private string GetListBoxHtml(ListBoxControl control)
        {
            if (control.Items.Count == 0)
            {
                control.FillData();
                ControlFilterRefresh(control);
            }
            string id   = GetControlID(control);
            string html = string.Format("<select style=\"{0}\" name=\"{1}\" size=\"{2}\" onchange=\"{3}\" id=\"{4}\">{5}</select>",
                                                                 // style
                                        GetListBoxStyle(control),
                                                                 // name
                                        control.Name,
                                                                 // size
                                        control.Items.Count.ToString(),
                                                                 // onclick
                                        GetEvent(ONCHANGE, control, DIALOG, $"document.getElementById('{id}').selectedIndex"),
                                                                 // title
                                        id,
                                        GetListBoxItems(control) //control.Text
                                        );

            control.FilterData();
            return(html);
        }