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
 how to insert and retrieve images from different databases in asp.net
Posted by abirami on  3/24/2010 2:26:38 AM Category: ADO.NET
Add to my favorites
Email to friend
i am using visual studio 2008 and sql server 2000 in windows xp.i am having a doubt that for example,i stored roses,birds in same database..but if i want only roses means how i will show only roses database..

Post Your Reply Post New Question

 Viewer's Reply
Sample to retrive Images stored in database based on Category in Asp.Net
Answered By Moderator1 on 3/26/2010 10:49:00 PM
Hi,

Please through our article at the below url,
http://www.aspdotnetcodes.com/Insert_Images_Database.aspx

The retrieval process you can use the same Handler.ashx with small modification.
1. You need to pass the category id as query string to the Handler.ashx.
2. Change the code in GridView control to retrieve the images based on category id as follows,
<asp:Image ID="Image1" runat="server" ImageUrl='<%# "Handler.ashx?id=" + Eval("Img_Id") %>+"&categoryid=rose"' />
3. Then in the ProcessRequest method of the Handler.ashx, filter the records based on the category id.

Hope this will help you. If you find any problem, let me know.
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Easing the Migration to Microsoft SQL Server 2005
The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks - Free 158 Page Preview
The Art & Science of JavaScript - Free 100 Page Preview!