示例#1
0
    public void cargarcarrucel2()
    {
        List<entPelicula> lst = new List<entPelicula>();
        lst = new busPelicula().ObtenerEstrenos();

        LiteralControl literalTres = new LiteralControl();

        LiteralControl literalCua = new LiteralControl();
        literalTres.Text = "";
        literalCua.Text = "";
        int contador = 0;

        foreach (entPelicula ent in lst)
        {

            if (contador == 0)
                literalTres.Text += "<li data-target=\"#carouselUno\" data-slide-to=\"" + contador + "\" class=\"active\"></li>";
            else
                literalTres.Text += "<li data-target=\"#carouselUno\" data-slide-to=\"" + contador + "\"></li>";
            if (contador == 0)
                literalCua.Text += "<div class=\"item active\">";
            else
                literalCua.Text += "<div class=\"item\">";
            literalCua.Text += " <img src=\"" + ent.FotoPortada + "\" style=\"height:200px; width:400px; margin:auto;\"/>";
            literalCua.Text += " <span class=\"style\"><strong>" + ent.Nombre + "</strong></span>";
            literalCua.Text += "  <div class=\"carousel-caption\">";

            literalCua.Text += "  </div>";
            literalCua.Text += "</div>";

            contador++;
        }
        ph1.Controls.Add(literalTres);
        ph2.Controls.Add(literalCua);
    }
示例#2
0
 public void CargarPelicula()
 {
     List<entPelicula> lst = new busPelicula().Obtener();
     llenarlt(lst);
 }