Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Models.PoliklinikEntities4 p=new Models.PoliklinikEntities4();

            var res = from c in p.UrunKategori select new {Adi = c.Adi };
            Menu m = new Menu();
            foreach (var item in res.ToList())
            {
             MenuItem l=new MenuItem();
                l.Value=item.Adi;
                m.Items.Add(l);
                Menu1.Items.Add(l);
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Models.PoliklinikEntities4 p = new Models.PoliklinikEntities4();

            var  res = from c in p.UrunKategori select new { Adi = c.Adi };
            Menu m   = new Menu();

            foreach (var item in res.ToList())
            {
                MenuItem l = new MenuItem();
                l.Value = item.Adi;
                m.Items.Add(l);
                Menu1.Items.Add(l);
            }
        }