AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 Datalist
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 folder...how 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
Hi,

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.
 
nice
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
Hi,

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.
 
Reply
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
Web Application Security — How to Minimize Prevalent Risk of Attacks
Sexy Web Design - Free 71 Page Preview!
Backup and Recovery Best Practices for Microsoft SQL Server 2005