product image
-
hi sir, i have a problem please give me your suggestion sir i have a gridview and it have a column product image.this column display the image of product.and from database i can fetch the address of images in dataset.sir now i want to display the image from that path .i mean i want to fetch the image on that path. in source what should i do for image field image url='<%%>' i mean as we bind our columns to dataset column same what should i do for fetch the image please help
-
hi sir, i have a problem please give me your suggestion sir i have a gridview and it have a column product image.this column display the image of product.and from database i can fetch the address of images in dataset.sir now i want to display the image from that path .i mean i want to fetch the image on that path. in source what should i do for image field image url='<%%>' i mean as we bind our columns to dataset column same what should i do for fetch the image please help
Hi Vikas, I think you want to set the image url, so try this.... (Based on the idea that you have told the gridview to have a Template Field)
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Product_Image") %>' />
So you would place it inside a template field like below.<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="ObjectDataSource1"><Columns> <asp:TemplateField HeaderText="Product\_Image" SortExpression="Product\_Image"> <ItemTemplate> <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Product\_Image") %>' /> </ItemTemplate> </asp:TemplateField> <asp:BoundField DataField="ProductTitle" HeaderText="ProductTitle" SortExpression="ProductTitle" /> <asp:BoundField DataField="ProductDesc" HeaderText="ProductDesc" SortExpression="ProductDesc" /> </Columns> </asp:GridView>
I think this is what you might mean. Hope it helps Rob
.NET Developer @ FactoryMaster Ltd "Software for TOUGH businesses"
-
hi sir, i have a problem please give me your suggestion sir i have a gridview and it have a column product image.this column display the image of product.and from database i can fetch the address of images in dataset.sir now i want to display the image from that path .i mean i want to fetch the image on that path. in source what should i do for image field image url='<%%>' i mean as we bind our columns to dataset column same what should i do for fetch the image please help
Hi, You should make sure the path stored in database is right. Then you can bind the image source, and set the img's src as the page-path: src="<%=eval('path')%>"
April Comm100 - Leading Live Chat Software Provider