473,322 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

gridview with image display

115 100+
Hi All
Expand|Select|Wrap|Line Numbers
  1.  
  2.             <asp:TemplateField HeaderText="homeimg" SortExpression="homeimg">
  3.  
  4.                 <ItemTemplate>
  5.                     &nbsp;<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("homeimg,productid", "Images\\productimg\\{1}\\ThumbnailImage\\{0}") %>' />
  6.                 </ItemTemplate>
  7.             </asp:TemplateField>
  8.  
i want pass 2 values how can i pass 2 value in image url

now i got error
pls help me

Thanks
Jul 11 '09 #1
2 2601
ThatThatGuy
449 Expert 256MB
didn't got the question really explain properly what do you want....
Jul 13 '09 #2
yogarajan
115 100+
Hi
Thanks for ur reply

i want display image in my grid


My table have 2 fields (Productid- Unique , Auto number; Homeimg- String)
look like this

Product id homeimg
1 cat.jpg
2 cow.jpg
3 dog.jpg

my image folder structure
1. Images(Parent folder name)
1.1 productimg(child folder name)
1.1.1 1 (First Child child folder name)
1.1.1.1 cat.jpg (Image file)
1.1.2 2 (Second Child child Folder name)
1.1.2.1 Cow.jpg (Image file)
1.1.3 3 (Third Child child folder name)
1.1.3.1 dog.jpg (image file )
my image path like this

images/productimg/1(Productid field )/cat.jpg(homeimg- field name)
images/productimg/2(Productid field )/Cow.jpg(homeimg- field name)
images/productimg/3(Productid field )/dog.jpg(homeimg- field name)


how can i get two values in grid


Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3.                <asp:TemplateField HeaderText="homeimg" SortExpression="homeimg">
  4.  
  5.                    <ItemTemplate>
  6.                        &nbsp;<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("homeimg,productid", "Images\\productimg\\{1}\\ThumbnailImage\\{0}") %>' />
  7.                    </ItemTemplate>
  8.                </asp:TemplateField>
  9.  
  10.  
  11.  
Jul 14 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Tan | last post by:
Hi I am desperate for any help with display image in Gridview I have a gridview contain surname , forename ..... and image. I could not display image as my database store the column image as...
0
by: Samy | last post by:
Hi There, I am trying to display images in a gridview and display only valid images from the html in the database (and not display spacers, 1x1 pixel images etc). For this, I have a gridview...
3
by: Froefel | last post by:
Hi group, I'm looking for some help on how to achieve the following in a gridview control that is based on an ObjectDataSource. The SelectMethod of the datasource returns a list of Customer...
10
by: gnewsgroup | last post by:
I've googled and tried various approaches, but could not resolve this problem. The article at MSDN: Displaying Images in a GridView Column only presents a simple case where all data (including the...
3
by: anjali5 | last post by:
Hello Everyone, I want to display an image in my gridview. The only thing is my datatabse table is returning true if there is an image and false if there is no image and I am binding my...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.