Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My image path in database is like this : ~/Pictures/bros.jpg
where the Pictures is a folder to store images that was uploaded.

So how do i bind the image to display in datalist.

In the past if the path is just bros.jpg my image databinding custom binding code would be Eval("Image", "Pictures/{0}") where Image is my database column and Picture is the folder. This works fine but currently the path is ~/Pictures/bros.jpg.
What code i should place in custom binding ?
Posted
Updated 18-Jul-13 6:13am
v2
Comments
Asp_Learner 18-Jul-13 12:55pm    
Write the code snippet ,what you are trying to do so?

1 solution

Read the image file using http handler and display the image. The only difference is previously you used to give a path, but not this will be done by a piece of code. Check this link Display images from a SQL database - the easy way[^]
 
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