Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. product image

product image

Scheduled Pinned Locked Moved ASP.NET
helpdatabase
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vikas shukla
    wrote on last edited by
    #1

    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

    R A 2 Replies Last reply
    0
    • V vikas shukla

      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

      R Offline
      R Offline
      Rob Branaghan
      wrote on last edited by
      #2

      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"

      1 Reply Last reply
      0
      • V vikas shukla

        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

        A Offline
        A Offline
        April Fans
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups