Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string ID;
- Label lblID = DataProducto.Items[4].FindControl("lbl_ID") as Label;
- ID = lblID.Text;
- Label lblNombre_prod =
- DataProducto.Items[0].FindControl("lblNombre_prod") as Label;
- string nombre = lblNombre_prod.Text;
- Label lbl_preciounit =
- DataProducto.Items[3].FindControl("lbl_preciounit") as Label;
- double precio = double.Parse(lbl_preciounit.Text);
- <asp:DataList ID="DataProducto" runat="server" RepeatDirection="Horizontal"
- OnItemCommand="DataProducto_ItemCommand">
- <ItemTemplate>
- <asp:Label ID="lblNombre_prod" runat="server" Text='<%#
- Eval("Nombre_prod") %>' Font-Bold="True"></asp:Label>
- <br />
- <asp:Image ID="img_prod" runat="server" ImageUrl='<%#
- Eval("img_Prod") %>' />
- <br />
- <asp:Label ID="lbl_descprod" runat="server" Text='<%#
- Eval("Descrip_prod") %>' Width="200px"></asp:Label>
- <br />
- <asp:Label ID="lbl_preciounit" runat="server" Text='<%#
- Eval("Precio_Unit") %>'></asp:Label>
- <br />
- <asp:Label ID="lbl_ID" runat="server" Text='<%#
- Eval("ID_producto") %>'></asp:Label>
- <br />
- <asp:Button ID="btnagregar" runat="server" Text="Agregar"
- CommandName="addtocart" OnClick="btnagregar_Click"/>
- </ItemTemplate>
- </asp:DataList>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement