Click here to Skip to main content
15,887,262 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello!
When I bind my Image Control to the Database with this
code,
XML
(ImageUrl='<%# Eval("teachImage", "~/admin/teacherPic//{0}") %>'@"~\admin\teacherPic\\")


It does not show all images that are in the database. Can you please tell me where this error is?
Posted
Updated 25-Aug-11 23:13pm
v4
Comments
Eslam Mostafa 24-Jul-11 23:09pm    
if your project show some pic that mean some pic's path is wrong
Parwej Ahamad 25-Jul-11 0:41am    
I supposed you have all image under the teacherPic and pic name in DB. So please try this way:
ImageUrl='<%# Eval("teachImage", "~/admin/teacherPic/{0}") %>'

Note: If still not able to display the image then view the page source see what is image path has picked. If not currect then provide the correct path.
Pradeep Shukla 29-Jul-11 17:24pm    
What error you are getting? And the size and quality of the image matters too..
so take care of those things too...

1 solution

try this

ImageUrl='<%# String.Concat(@"~\Uploads\PlaceImages\SmallImage\",Eval("placetovisitimages_image")) %>'

// Where @"~\Uploads\PlaceImages\SmallImage\" this is your Image folder Path

// and Database Image Name :-  Eval("placetovisitimages_image")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900