protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["stanje"] != null)
     {
         if ((int)Session["stanje"] > 1)
         {
             Response.Redirect("index.aspx");
         }
     }
     else
     {
         Response.Redirect("index.aspx");
     }
     if (!IsPostBack)
     {
         Dictionary <string, int> dictionary = new Dictionary <string, int>();
         dictionary = Baza.DobiZnamke();
         foreach (KeyValuePair <string, int> entry in dictionary)
         {
             this.DropDownList3.Items.Insert(0, new ListItem(entry.Key, entry.Value.ToString()));
         }
         dictionary = new Dictionary <string, int>();
         int idzn = Int32.Parse(this.DropDownList3.SelectedValue);
         dictionary = Baza.DobiModele(idzn);
         foreach (KeyValuePair <string, int> entry in dictionary)
         {
             this.DropDownList2.Items.Insert(0, new ListItem(entry.Key, entry.Value.ToString()));
         }
     }
 }
        protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
        {
            Dictionary <string, int> dictionary = new Dictionary <string, int>();
            int idzn = Int32.Parse(this.DropDownList3.SelectedValue);

            dictionary = Baza.DobiModele(idzn);
            this.DropDownList2.Items.Clear();
            foreach (KeyValuePair <string, int> entry in dictionary)
            {
                this.DropDownList2.Items.Insert(0, new ListItem(entry.Key, entry.Value.ToString()));
            }
            this.UpdatePanel.Update();
        }