protected void Page_Load(object sender, EventArgs e) { this.Title += " | Moj portal"; if (!this.IsPostBack) { Dictionary <int, string> osobe = new Dictionary <int, string>(); osobe.Add(0, "Izaberi..."); osobe.Add(1, "Administrator"); osobe.Add(2, "Moderator"); DropDownListOsoba.DataSource = osobe; DropDownListOsoba.DataTextField = "Value"; DropDownListOsoba.DataValueField = "Key"; DropDownListOsoba.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { this.Title = "IT Blog | Kontakt"; if (!this.IsPostBack) { if (User.IsInRole("admin")) { Master.FindControl("LabelLinkoviAdmin").Visible = true; } else { Master.FindControl("LabelLinkoviAdmin").Visible = false; } if (User.IsInRole("korisnik")) { Master.FindControl("LabelLinkoviKorisnici").Visible = true; } else { Master.FindControl("LabelLinkoviKorisnici").Visible = false; } if (User.IsInRole("autor")) { Master.FindControl("LabelLinkoviAutori").Visible = true; } else { Master.FindControl("LabelLinkoviAutori").Visible = false; } Dictionary <int, string> osobe = new Dictionary <int, string>(); osobe.Add(0, "Izaberite..."); osobe.Add(1, "Autora"); osobe.Add(2, "Administratora"); DropDownListOsoba.DataSource = osobe; DropDownListOsoba.DataTextField = "Value"; DropDownListOsoba.DataValueField = "Key"; DropDownListOsoba.DataBind(); } }