Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            LoteController lc    = new LoteController();
            List <Lote>    lista = lc.ListarTodos();

            gvLote.DataSource = lista.OrderBy(c => c.Nome);
            gvLote.DataBind();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         LoteController lc = new LoteController();
         ddlLote.DataSource = lc.ListarTodos();
         ddlLote.DataBind();
     }
 }