示例#1
0
        protected override void RenderContents(HtmlTextWriter writer)
        {
            ComboTable.RenderControl(writer);

            OptionListControl.Items.Clear();
            ListItem[] copy = new ListItem[Items.Count];
            Items.CopyTo(copy, 0);
            OptionListControl.Items.AddRange(copy);
            OptionListControl.RenderControl(writer);

            HiddenFieldControl.RenderControl(writer);
        }
示例#2
0
 public override void RenderControl(HtmlTextWriter writer)
 {
     if (DesignMode)
     {
         CreateChildControls();
         AddAttributesToRender(writer);
         ComboTable.RenderControl(writer);
     }
     else
     {
         HiddenFieldControl.Value = SelectedIndex.ToString();
         base.RenderControl(writer);
     }
 }