Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["uporabnik"] == null || Session["stanje"] == null)
     {
         Response.Redirect("index.aspx");
     }
     else if ((int)Session["stanje"] != 3)
     {
         Response.Redirect("index.aspx");
     }
     if (!IsPostBack)
     {
         Dictionary <int, string> dictionary = new Dictionary <int, string>();
         dictionary = Baza.DobiModeleBrezZnamke();
         foreach (KeyValuePair <int, string> entry in dictionary)
         {
             this.DropDownList1.Items.Insert(0, new ListItem(entry.Value.ToString(), entry.Key.ToString()));
         }
     }
 }