Пример #1
0
        private void CargarServicios()
        {
            List <ServicioExtra> servicios = ServicioExtraDao.ObtenerServicios();

            ddlServ.DataSource = null;

            ddlServ.DataTextField = "nombre";

            ddlServ.DataValueField = "id";

            ddlServ.DataSource = servicios;

            ddlServ.DataBind();
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     gdv_serviciosextra.DataSource   = ServicioExtraDao.ObtenerServicios();
     gdv_serviciosextra.DataKeyNames = new string[] { "id" };
     gdv_serviciosextra.DataBind();
 }