Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
Posted by rutika shihoorkar on  11/5/2009 5:30:40 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
I hv stored path of images in database in binary format...n d images are actually stored in solution explorer n Images can i retrieve that in datalist....????? like image of C book, C++ book...retrive 4m there

Post Your Reply Post New Question

 Viewer's Reply
Store Image File Name in DB
Answered By Moderator1 on 11/5/2009 9:23:05 PM

Why you save the Image File name in binary format. Its no use. Instead you can save the image file name as varchar in database, in the DataList, place a Image Control, and binds its ImageUrl property with the value from the database. Its easy.
Answered By rutika shihoorkar on 11/6/2009 12:39:19 AM
its nice to see reply...but i hv around 500 images...n i only store path of those images in database in binary format...n actual images r in solution explorer in images folder...
now i hv datalist n i want images acc. to Category ID means image of C book identified n in datalist
Filter Based on Category Id
Answered By Moderator1 on 11/6/2009 9:31:24 PM

So you have a Category Id field in the table stored along with the Image Name. Thats good. So you can filter the images based on the Category Id and displayed in the DataList's Image Control.

One thing you have do, change the binary format Image Name to ordinary VarChar string field. Don't worry about the number of images.
Answered By rutika shihoorkar on 11/7/2009 1:15:37 AM
thats nice but m confused could u plz code this???
Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks - Free 156 Page Preview
Simply JavaScript - Free 150 Page Preview!
Web Application Security — How to Minimize Prevalent Risk of Attacks