Ejemplo n.º 1
0
        private void btnAuthor_Click(object sender, EventArgs e)
        {
            AuthorControl control = new AuthorControl();

            CleanControls();
            pnlControls.Controls.Add(control);
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Dictionary <int, string> authorsDictionary = new AuthorControl().getAuthor();
            ListItem item;

            if (!Page.IsPostBack)
            {
                foreach (int key in authorsDictionary.Keys)
                {
                    item       = new ListItem();
                    item.Value = key.ToString();
                    item.Text  = authorsDictionary[key];

                    DropDownList_author.Items.Add(item);
                }
            }
            //DropDownList_author.DataSource = new AuthorControl().getAuthor();
        }